DevTools: Make UI.SoftDropdown follow ARIA Action Menu Button pattern
This change will make it easier for screen reader users to select the JavaScript Context in the Console and the audio context in the Web Audio tool by moving focus to the menu on activation and reading the selected position of the item. Summary of changes: - Decorated markup with appropriate ARIA properties. - Moved focus from button to menu following active-descendant pattern [1]. - Dropdown selection is now only finalized by clicking an item, or pressing Enter, Space, or Tab. Scope of impact: The SoftDropDown is currently used as the JavaScript context selector in the Console tool and audio context in the Web Audio tool. [1] https://w3c.github.io/aria-practices/examples/menu-button/menu-button-actions-active-descendant.html [2] https://cs.chromium.org/search/?q=UI.SoftDropDown+-f:out+f:.js+f:front_end&sq=package:chromium&type=cs Screenshot: https://i.imgur.com/jIpsRYP.png Gif: https://i.imgur.com/V4FoqKn.gifv Bug: 963183 Change-Id: Iaf44f50639626fe22ef55862ae3a8b93962a4efe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626643 Commit-Queue: John Emau <johnemau@microsoft.com> Reviewed-by:Erik Luo <luoe@chromium.org> Cr-Commit-Position: refs/heads/master@{#686682}
Showing
Please register or sign in to comment