Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Pages: Use multiple kbd elements for commands with multiple keys #3093

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

mcking65
Copy link
Contributor

@mcking65 mcking65 commented Aug 11, 2024

Replaces #1611.

Currently, keyboard commands that require pressing multiple keys are written as <kbd>key1 + key2</kbd>. This changes the syntax to <kbd>key1</kbd> + <kbd>key2</kbd>.

To change kbd elements that contained two keys separated by '+', searched for:

<kbd>(\w+)\s*\+\s*(\w+(?:\s+\w+)*)</kbd>

To change kbd elements that contained three keys separated by '+', searched for:

<kbd>(\w+)\s*\+\s*(\w+(?:\s+\w+)*)\s*\+\s*(\w+(?:\s+\w+)*)</kbd>

WAI Preview Link (Last built on Thu, 12 Sep 2024 15:17:05 GMT).

@css-meeting-bot
Copy link
Member

The ARIA Authoring Practices (APG) Task Force just discussed Fix for kbd elements.

The full IRC log of that discussion <jugglinmike> Topic: Fix for kbd elements
<jugglinmike> github: https://github.com//pull/3093
<jugglinmike> Matt_King: This is another one of those old patches that needed to be refactored and redone
<jugglinmike> Matt_King: The changes are simple; just need checking to make sure the search/replace didn't produce any unexpected and undesirable results.
<jugglinmike> Matt_King: This patch transforms 2- and 3-chord key commands according to how the "kbd" element is intended to be used
<jugglinmike> Adam_Page_: I can review that
<jugglinmike> arigilmore: I can review, as well
<jugglinmike> Matt_King: Great; I'll add you both
<jugglinmike> Matt_King: I'm not going to add a review checklist like we normally do because this one is so simple

Copy link
Member

@adampage adampage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks thorough and accurate to me. 🚀

Copy link
Contributor

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I also just noticed in the example-template.html it demonstrates how use of <kbd>, so maybe we can update the example here as well:

Use + to separate modifiers, e.g., <kbd>Control + Right Arrow</kbd>.

@mcking65 mcking65 merged commit b606e34 into main Sep 12, 2024
23 checks passed
@mcking65 mcking65 deleted the kbd-tags branch September 12, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants