Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…gar2024/index.md?cl=head#preview-of-new-criteria

RELNOTES: Update documentation of how to register keyboard shortcuts so it only includes examples that follow accessibility guidance for use of modifiers. https://www.w3.org/WAI/WCAG21/Understanding/character-key-shortcuts
BEGIN_PUBLIC

PiperOrigin-RevId: 564787380
Change-Id: I942e500102bf9c55b4a33367a2ca58a1ae1007e0
  • Loading branch information
Closure Team authored and copybara-github committed Sep 12, 2023
1 parent 4ce3e68 commit 057c173
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions closure/goog/ui/keyboardshortcuthandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,18 @@ goog.ui.KeyboardShortcutHandler.prototype.setAllowSpaceKeyOnButtons = function(
* identifier and the string.
*
* Examples:
* g registerShortcut(str, G_KEYCODE)
* up registerShortcut(str, goog.events.KeyCodes.UP)
* Ctrl+g registerShortcut(str, G_KEYCODE, CTRL)
* Ctrl+Shift+g registerShortcut(str, G_KEYCODE, CTRL | SHIFT)
* Ctrl+g a registerShortcut(str, G_KEYCODE, CTRL, A_KEYCODE)
* Ctrl+g Shift+a registerShortcut(str, G_KEYCODE, CTRL, A_KEYCODE, SHIFT)
* g a registerShortcut(str, G_KEYCODE, NONE, A_KEYCODE)
*
* Examples using string representation for shortcuts:
* g registerShortcut(str, 'g')
* up registerShortcut(str, 'up')
* Ctrl+g registerShortcut(str, 'ctrl+g')
* Ctrl+Shift+g registerShortcut(str, 'ctrl+shift+g')
* Ctrl+g a registerShortcut(str, 'ctrl+g a')
* Ctrl+g Shift+a registerShortcut(str, 'ctrl+g shift+a')
* g a registerShortcut(str, 'g a').
*/
goog.ui.KeyboardShortcutHandler.prototype.registerShortcut = function(
identifier, var_args) {
Expand Down

0 comments on commit 057c173

Please sign in to comment.