RE: ACTION-1642: New aria-kbdshortcuts property (for Issue 711)

I highly support the general idea for a specific informative property like that.

-      Maybe shorter: "aria-keys" (in plural since name always include option to have more)

-      Syntax: Details to be clarified

-      Important: The definition must also include a string with functional description for screen readers can form up semantics from that (e.g. "Press [CTRL] and  [+] or [-] to toggle expand/collapse")

Hint: What is the relationship to the also proposed "aria-help" property for that purpose?


-      Stefan

From: Richard Schwerdtfeger [mailto:schwer@us.ibm.com]
Sent: Dienstag, 9. Juni 2015 18:31
To: PF
Cc: Dominic Mazzoni
Subject: ACTION-1642: New aria-kbdshortcuts property (for Issue 711)


Please review this proposal based on a proposal from Dominic Mazzoni for the Thursday ARIA call. We may come up for another name for this ... like aria-shortcuts, aria-key, or aria-keygboardshortcuts:

aria-kbdshortcuts (property)

Indicates keyboard shortcuts that can be pressed to activate widgets, such as a button, link or menuitem. Any widget that has a default activation behavior when clicked can have a keyboard shortcut.

The value of the aria-kbdhortcuts attribute is a space-delimited list of keyboard shortcuts that can be pressed to activate the command widget. Each keyboard shortcut consists of one or more tokens delimited by the plus sign ("+") representing zero or more modifier keys and exactly one non-modifier key that must be pressed simultaneously to activate the given shortcut.

Modifier keys must be specified exactly according to the DOM Level 3 KeyboardEvent key Values spec: http://www.w3.org/TR/DOM-Level-3-Events-key/ - for example, "Alt", "Control", "Shift", "Meta", or "AltGraph". Note that Meta corresponds to the Command key on Apple computers.

The valid names for non-modifier keys are any printable character such as "A", "B", "1", "2", "$", "Plus" for a plus sign, "Space" for the spacebar, or the names of any other non-modifier key specified in the DOM Level 3 KeyboardEvent key Values spec: http://www.w3.org/TR/DOM-Level-3-Events-key/ - for example, "Enter", "Tab", "ArrowRight", "PageDown", "Escape", or "F1".

When modifier keys are part of a shortcut, they must come first. The non-modifier key is required and must come last. The order of the modifier keys is not otherwise significant, so "Alt+Shift+T" and "Shift+Alt+T" are equivalent, but "T+Shift+Alt" is not valid because all of the modifier keys don't come first, and "Alt" is not valid because it doesn't include at least one non-modifier key.

When specifying an alphabetic key, both the uppercase and lowercase variants are considered equivalent: "a" and "A" are the same, as are "ü" and "Ü".

When specifying a key on the keyboard that changes when you hold down a modifier key other than an alphabetic key, you must specify the unmodified key name. For example, on most U.S. English keyboards, the percent sign "%" can be printed by pressing Shift+5. The correct way to specify this shortcut is "Shift+5". It is incorrect to specify "%" or "Shift+%". However, note that on some international keyboards the percent sign may be an unmodified key, in which case "%" and "Shift+"%" would be correct on those keyboards.

If the key that needs to be specified is illegal in the host language or would cause a string to be terminated, use the string escaping sequence of the host language to specify it. For example, the double-quote character can be encoded as " in HTML.

Examples of valid keyboard shortcuts include:

"A"
"Shift+Space"
"Control+Alt+."
"Ctrl+%quot;"

Examples of valid values for the aria-key attribute, which can include more than one space-delimited shortcut, include:

aria-kbdshortcuts="Alt+Shift+P"
aria-kbdshortcuts="/ Ctrl+F"
aria-kbdshortcuts="Meta+C Meta+Shift+C"

Adding the aria-keyshortcuts attribute to an element does not change the behavior of the user agent by mapping the specified keyboard shortcuts to the triggering of the element's activation function. It is still up to the application to implement support for the keyboard shortcuts. The aria-keyshortcuts attribute exposes the fact that these shortcuts exist so that assistive technologies can communicate this information to users.

Keyboard shortcuts are assumed to be global. If a button is present in a document and it is visible and enabled, and it exposes a keyboard shortcut, it is assumed that as long as the document has focus, pressing that keyboard shortcut will activate that button. If the button or other element is not currently available to be activated normally, for example because it's currently invisible or hidden, or explicitly marked as disabled, that implies that the keyboard shortcut is unavailable too.

Characteristics:
Related Concepts:
<a ref="http://en.wikipedia.org/wiki/Keyboard_shortcut">Keyboard shortcut</a>

Used in Roles:
command
checkbox
option
gridcell

Inherits into roles:
button
columnheader
link
radio
rowheader
menuitem
menuitemcheckbox
menuitemradio
treeitem

Value:
string



Rich Schwerdtfeger

Received on Wednesday, 10 June 2015 10:02:12 UTC