-
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
Make the site editor header toolbar use the ARIA toolbar pattern #41902
Make the site editor header toolbar use the ARIA toolbar pattern #41902
Conversation
Size Change: +355 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
This is awesome, will check this out shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For functionality, accessibility, and code quality, I am giving it my sign off. Code looks solid and it works much better for accessibility.
It would be great to get visual feedback and further technical review.
Fixes #41869
What?
Improves accessibility by making the header toolbar in the Site Editor use the ARIA toolbar pattern. This is consistent with other similar toolbars, e.g. the header toolbar in the Block Editor, in the Edit widgets, Edit navigation, etc.
Why?
The header toolbar in the Site Editor has a different keyboard interaction model compared to other similar toolbars. Also, has different semantics.
How?
<NavigableToolbar>
component, similarly to the header in the post editor and other toolbars.<ToolbarItem>
components. This is necessary to determine whether the toolbar is an 'accessible toolbar' that uses the<Toolbar>
component.<Toolbar>
component. add some different styles to the buttons, so it was necessary to adjust the CSS. These changes are basically copied from the styles used for the edit post toolbar, seepackages/edit-post/src/components/header/header-toolbar/style.scss
. These changes also improve consistency.Testing Instructions
Right arrow
to move to the next button.Left arrow
to move to the previous button.End
to move to the last button.Home
to move to the first button.Fn + Left arrow
, End isFn + Right arrow
.Check the style:
Note: at some viewport widths, the overall header in the Site Editor would need some work but this is out of the scope of this issue.
Screenshots or screencast