-
Notifications
You must be signed in to change notification settings - Fork 522
Rework 2.1.4 Character Key Shortcut understanding #5336
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
base: main
Are you sure you want to change the base?
Changes from 19 commits
27e0688
31d4482
f384ccb
ae22fcc
35089b7
4165276
0b4645f
93e7acb
1334c08
2942012
e87f1c9
56e6f73
083595e
102e248
b1bb472
b72ce96
48b797f
a71fcef
9f5c09e
8a3d58d
b1997b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,33 +13,38 @@ <h2>In brief</h2> | |
| <dl> | ||
| <dt>Goal</dt><dd>Reduce accidental activation of keyboard shortcuts.</dd> | ||
| <dt>What to do</dt><dd>Ensure character-only shortcut keys can be turned off or modified.</dd> | ||
| <dt>Why it's important</dt><dd>Character-key shortcuts are easy to accidentally trigger, especially with speech input.</dd> | ||
| <dt>Why it's important</dt><dd>Character-key shortcuts are easy to accidentally trigger, especially for keyboard and speech input users.</dd> | ||
| </dl> | ||
| </section> | ||
|
|
||
| <section id="intent"> | ||
| <h2>Intent</h2> | ||
| <p>The intent of this success criterion is to reduce accidental activation of keyboard shortcuts. Character key shortcuts work well for many keyboard users. However, they can be inappropriate and frustrating for speech input users, whose dictation is interpreted as strings of letters, and for keyboard users who are prone to accidentally hit keys. To rectify this issue, authors need to allow users to turn off or reconfigure shortcuts that are made up of only character keys.</p> | ||
| <p>The intent of this success criterion is to reduce accidental activation of keyboard shortcuts. Character key shortcuts work well for many keyboard users. However, particularly if the shortcuts are mapped to single printable characters, keyboard users may trigger them accidentally. These shortcuts can also be problematic for certain voice control/speech recognition users, as some of the software used by this user group converts any speech into simulated key presses, which can lead to unintended activations. To rectify this issue, authors need to allow users to turn off or reconfigure shortcuts that are mapped to single character keys.</p> | ||
| <div class="note"> | ||
| <p>Even though this success criterion refers to <q>character keys</q>, note that it's not relevant whether a shortcut can be activated using a single physical key on a keyboard, or if it requires a combination of keys to be pressed. For instance, on most full-size US and UK keyboard, the <kbd>?</kbd> (question mark) symbol is accessed using <kbd><kbd>Shift</kbd>+<kbd>/</kbd></kbd> (forward slash key next to the right-hand <kbd>Shift</kbd> key). On a UK keyboard, in Windows, the <kbd>é</kbd> (lowercase "e" with an acute accent) requires the use of <kbd><kbd>AltGr</kbd>+<kbd>e</kbd></kbd>. The specific key combination required for certain characters will also vary depending on the user's keyboard layout. However, shortcuts that use these characters still fall under the requirements of this success criterion. What matters is that a shortcut relies on a printable character (letters, punctuation, numbers, symbol characters), and not the number of physical keyboard keys that users need to press to trigger it.</p> | ||
| <p>Even though this success criterion refers to <q>character <strong>keys</strong></q>, note that it's not relevant whether a shortcut can be activated using a single physical <em>key</em> on a keyboard, or if it requires a combination of keys to be pressed. For instance, on most full-size US and UK keyboard, the <kbd>?</kbd> (question mark) symbol is accessed using <kbd><kbd>Shift</kbd>+<kbd>/</kbd></kbd> (forward slash key next to the right-hand <kbd>Shift</kbd> key). On a UK keyboard, in Windows, the <kbd>é</kbd> (lowercase "e" with an acute accent) requires the use of <kbd><kbd>AltGr</kbd>+<kbd>e</kbd></kbd>. The specific key combination required for certain characters will also vary depending on the user's keyboard layout. However, shortcuts that use these characters still fall under the requirements of this success criterion. What matters is that a shortcut relies on a printable character (letters, punctuation, numbers, symbol characters), and not the number of physical keyboard keys that users need to press to trigger it.</p> | ||
| </div> | ||
| <div class="note"> | ||
| <p>The success criterion also applies to situations where a shortcut is based on a <em>sequence</em> of character keys – for example, pressing <kbd>G</kbd> and then <kbd>A</kbd> in quick succession to trigger an action. While the individual character key presses don't immediately trigger the action, overall these types of shortcuts still rely on a series of <em>character keys</em>.</p> | ||
| </div> | ||
| <p>This success criterion doesn't affect components such as listboxes and drop-down menus. Although these components contain values (words) that may be selected by one or more character keys, the shortcuts are only active when the components have focus. Other components such as menus may be accessed or opened with a single non-character shortcut (e.g., <kbd>Alt</kbd> or <kbd><kbd>Alt</kbd>+<kbd>F</kbd></kbd>) before pressing a single character key to select an item. This makes the full path to invoking a menu a two-step shortcut that includes a non-printable key. <a href="https://www.w3.org/TR/html5/single-page.html#the-accesskey-attribute">Access keys</a> are also not affected because they are generally (depending on the user agent) activated using modifier keys.</p> | ||
|
|
||
| <h3>Background on the mechanics of speech input</h3> | ||
| <p>Speech input users generally work in a single mode where they can use a mix of dictation and speech commands. This works well because the user knows to pause before and after commands, and commands are usually at least two words long. So, for instance, a user might say a bit of dictation, such as "the small boat", then pause, and say a command to delete that dictation, such as "Delete Line". In contrast, if the user were to say the two phrases together without a pause, the whole phrase would come out as dictation (i.e., "the small boat delete line"). Although speech input programs often include modes that listen only for dictation or only for commands, most speech users use the all-encompassing mode all the time because it is a much more efficient workflow. It could decrease command efficiency significantly if users were to change to command mode and back before and after issuing each command.</p> | ||
| <p>Speech users can also speak most keyboard commands (e.g., "press Control Foxtrot") without any problems. If the website or app is keyboard enabled, the speech user can also write a native speech macro that calls the keyboard command, such as "This Print" to carry out <kbd><kbd>Ctrl</kbd>+<kbd>P</kbd></kbd>.</p> | ||
| <p>Single-key shortcuts are the exception. While using single letter keys as controls might be appropriate and efficient for many keyboard users, single-key shortcuts are disastrous for speech users. The reason for this is that when only a single key is used to trip a command, a spoken word can become a barrage of single-key commands if the cursor focus happens to be in the wrong place.</p> | ||
| <p>For example, a speech-input user named Kim has her cursor focus in the main window of a web mail application that uses common keyboard shortcuts to navigate (<kbd>k</kbd>), archive (<kbd>y</kbd>) and mute messages (<kbd>m</kbd>). A coworker named Mike enters her office and says "Hey Kim" and her microphone picks that up. The Y of "hey" archives the current message. K in "Kim" moves down one conversation and M mutes a message or thread. And, if Kim looks up and says "Hey Mike" without remembering to turn off the microphone, the same three things happen in a different sequence.</p> | ||
| <p>A user interacting with a web page or web app that doesn't use single-character shortcuts doesn't have this problem. Inadvertent strings of characters from the speech application are not interpreted as shortcuts if a modifier key is required. A speech user filling in a text input form may find that a phrase that is accidentally picked up by the speech microphone results in stray text being entered into the field, but that is easily seen and undone. The Resources section of this page contains links to videos demonstrating these types of issues.</p> | ||
| <p>Speech input users generally work in a single mode where they can use a mix of dictation and speech commands. The user knows to pause before and after commands, and commands are usually at least two words long. So, for instance, a user might say a bit of dictation, such as "the small boat", then pause, and say a command to delete that dictation, such as "Delete Line". In contrast, if the user were to say the two phrases together without a pause, the whole phrase would come out as dictation ("the small boat delete line").</p> | ||
| <p>In most cases, voice control/speech recognition software is "context-aware" – speech is not interpreted as dictation, unless focus is on a form control or field that accepts keyboard input. Otherwise, speech is only interpreted as a command. In addition, even when focus is inside a form control or field that accepts keyboard input, dictation does not generate synthetic key presses – the spoken text is generally injected directly into the relevant form control/field. Synthetic key presses only happen when a user gives an explicit command, such as "Press X key".</p> | ||
| <p>However, there are some voice control/speech recognition programs (such as <a href="https://talonvoice.com/">Talon Voice</a>) that are not "context-aware". All speech is interpreted as either a command or dictation, regardless of where the current focus is. In addition, saying certain keywords is interpreted by some programs as a shorthand for the "Press … key" command, leading to potential unintentional single key presses. Critically, programs that are not "context-aware" may also turn dictation into synthetic key presses, meaning that an unintentionally spoken word can become a sequence of single-key commands if the cursor focus happens to be in the wrong place. Character key shortcuts will be problematic for users of these non-context-aware programs.</p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reference to Talon Voice: How long will that be valid? Leave out brand name?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the issue here is that it seems Talon is pretty much the only tool out there that behaves this way it seems...this is a way to salvage the whole voice angle, in my view, as none of the other voice control/voice access tools commonly used now have the problem this SC purports to solve...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with Detlev, I would not get as far as naming a specific software here |
||
|
|
||
| <h3>Keyboard use with screen readers</h3> | ||
| <p>The behavior of screen readers when it comes to keyboard interactions, and whether or not key presses are passed on to web content, varies depending on the specific platform and screen reader in use.</p> | ||
| <p>On Windows, screen readers such as Jaws, NVDA, and Narrator generally intercept all key presses, as many of the shortcuts to control screen readers use single keys. Key presses are then only passed on to web content depending on the context. For instance, if focus is on a <code>button</code> element, only <kbd>Space</kbd> and <kbd>Enter</kbd> key presses (and a few generic keys, such as <kbd>Tab</kbd>) will be passed to the web content – any other key presses will be "swallowed" by the screen reader. This behavior is overridden in HTML when elements have a <code>role="application"</code>, or are children of an element with that <code>role</code>. In general, character key shortcuts won't be problematic for Windows screen reader users, as it's unlikely that they'd accidentally trigger a shortcut.</p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good stuff - but the general concern is that all this is fairly specific and might change any time, thereafter being either wrong or needing to be updated. (Will we? How soon?) I wonder whether acceptance of single keystroks should be linked to the SR mode (browse of forms mode) rather than highlighting role application - not sure. You have done all the research...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we either get specific, or we generalise and give the wrong impression (as the current understanding does ... it makes it sound like the problem described happens in all voice access/control scenarios, but it's actually only when using niche software). so the same problem may happen here, if we just generalise it as "in some cases this is a problem"). in this case, i'd rather be more specific, than pretending that things are a general issue/problem when they're not.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that role="application" is used in frequently-used apps such as gmail, so can seem common.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A thorough explanation of browse mode vs. focus/forms mode seems necessary to me
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. browser mode vs focus mode does not change how it behaves with regards to passing key events to the page though, so not sure it's necessary?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As to browse mode, I assumed for a second that things like SR single character shortcuts (e.g. "h" to jump to headings) would not work in forms mode, but it is in fact only when focus is on text
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, since the section is about screen reader I believe that this deserves at least a mention. At the same time, browse mode can be turned on manually (not a likely scenario, but it can be done) even when a specific component is currenlty focused
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
just a quick note that it's the other way around: AT sits between the keyboard and the browser. any keypresses are either consumed by the AT, or passed on to the browser (not the other way around) |
||
| <p>On macOS, the default VoiceOver commands use modifier keys (<kbd>Command</kbd>, <kbd>Ctrl</kbd>, <kbd>Option</kbd>). VoiceOver won't intercept key presses, meaning that any arbitrary key presses will be passed on directly to web content, just as for regular keyboard users. Switching VoiceOver to "single-key quick navigation" will result in key presses associated with commands to be intercepted, while other key presses are still passed on – and <code>role="application"</code> has no influence on this. As a result, screen reader users on macOS may accidentally trigger character key shortcuts, the same way regular keyboard users can.</p> | ||
| <p>In Gnome/Linux, the Orca screen reader uses a mix of single-key commands and commands that are activated using one or more modifier keys. These commands can also vary depending on the specific application being used, and its level of support in Orca. In general, currently Orca behaves similarly to macOS/VoiceOver – when key presses are associated with screen reader commands, they are intercepted. Otherwise, key presses are passed on to the page. <code>role="application"</code> appears to have no effect.</p> | ||
| </section> | ||
| <section id="benefits"> | ||
| <h2>Benefits</h2> | ||
| <ul> | ||
| <li>Speech users will be able to turn off single-key shortcuts so they can avoid accidentally firing batches of them at once. This will allow speech users to make full use of programs that offer single-key shortcuts to keyboard users.</li> | ||
| <li>Keyboard-only users who have dexterity challenges can also be prone to accidentally hitting keys. Those users would be able to avoid problematic single character shortcuts by turning them off or modifying them to include at least one non-character key.</li> | ||
| <li>Allowing <em>all</em> shortcut keys to be remapped can help users with some cognitive disabilities, since the same shortcuts can be assigned to perform the same actions across different applications.</li> | ||
| <li>Users will be able to turn off single-key shortcuts, or modify them to include at least one non-character key, so they can avoid accidentally triggering them.</li> | ||
| <li>Keyboard-only users who have dexterity challenges can avoid problematic single character shortcuts by modifying/remapping them.</li> | ||
| <li>Allowing <em>all</em> shortcut keys to be remapped can help users with some cognitive disabilities, allowing them to assign actions to the same shortcuts that they may already be familiar with from other sites or applications.</li> | ||
| </ul> | ||
| </section> | ||
| <section id="examples"> | ||
|
|
@@ -55,16 +60,9 @@ <h3>Alternate Control</h3> | |
| </section> | ||
| <section id="resources"> | ||
| <h2>Resources</h2> | ||
| <p>Web apps that use character-key shortcuts and allow users to disable and/or change these shortcuts:</p> | ||
| <ul> | ||
| <li>Gmail</li> | ||
| <li>WordPress</li> | ||
| <li><a href="../working-examples/key-event-logger/">Key event logger</a> – logs all JavaScript key events that reach the document; useful to verify if a specific combination of platform, user agent, and assistive technology fires key events.</li> | ||
| </ul> | ||
| <p>Videos of speech user trouble with single character key shortcuts:</p> | ||
| <ul> | ||
| <li><a rel="nofollow" href="https://www.youtube.com/watch?v=xzSyIA4OWYE">Single character key shortcuts affecting speech input – example 1</a></li> | ||
| <li><a rel="nofollow" href="https://www.youtube.com/watch?v=OPjfpDU9S08">Single character key shortcuts affecting speech input – example 2</a></li> | ||
| </ul> | ||
| </section> | ||
| {% # Data for associated techniques is defined in understanding/understanding.11tydata.js %} | ||
| {% include "understanding/techniques.html" %} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.