-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Toolbar elements are tabbable #15331
Comments
Related to the general issue (mentioned several times) that there are too many tab stops when navigating through the blocks UI. See for example #632, #3383, #5694, and #1934 (comment) |
Note: this part:
relates to the (the icon was changed in #13403). In default mode, this link is not rendered: This link needs to be moved out from the |
Re: the toolbar general issue, there are a few options. As reported, the purpose of a role=toolbar is:
Reducing the amount of Tab stops is by far the most important goal especially when a toolbar has many buttons. Consider, for example, the "Top Toolbar" option adds several buttons: More importantly, please consider this applies also to the block toolbars: As mentioned in other issues and PRs: imagine a post with 10 paragraph blocks. Keyboard navigation through 10 block toolbars like the one in the screenshot above requires 90 tab stops. It could be reduced to just 10 tab stops by implementing only arrows navigation. However, a good point is that not all users may be familiar with this pattern (although it's a standard pattern widely used also in the operating systems user interfaces). Options to evaluate: Keep both arrows key and Tab navigation adding support for the Home and End keys:
Implement only arrows key navigation (and maybe add the roving tabindex pattern):
|
All toolbar blocks are now working with roving tabindex on master. Should we close this? |
Amazing work, let's close 🥳 |
Toolbar elements are tabbable
Issue description
Keyboard-only users who enter the Editor Top Bar must Tab from button to
button. Although this is manageable when there's a small number of
buttons, the group of buttons is given the role of
toolbar
, whosepurpose (besides grouping related controls) is to lessen the number of
Tab stops keyboard users must make to navigate past widgets.
Screen reader users may be told they are entering a toolbar and expect
to be able to Tab past everything in it. Their experience does not match
the promise of the role.
Screen reader users may also miss the toolbar role when meeting the
first item (an anchor), because roles such as toolbar are sometimes only
announced when users meet items which can trigger their forms/focus
mode. Since the anchor's behaviour is semantically different from the
buttons' (the buttons deal with the editable content, the anchor simply
takes users back), it may make more sense to keep the anchor out of the
toolbar group.
Issue Code
Remediation Guidance
Move the "View Posts..." anchor out of the
role=toolbar
section,so the toolbar only has
<button>
children.Although ideally it would be a better use of the
toolbar
pattern toimplement Arrow-keys only, and not support Tab navigation between items,
this pattern may not be familiar to all users. Adding support for the
Home and End keys (for jumping to the first and last item in the
toolbar) will help here: this will allows users who know the keyboard
pattern for ARIA toolbars to efficiently get past the toolbar, while
leaving the Tab pattern for users who do not.
Recommended Code
References
https://www.w3.org/TR/wai-aria-practices-1.1/#toolbar
Relevant standards
(Level A)
Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-8 in Tenon's report
The text was updated successfully, but these errors were encountered: