-
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
Remove menubar role and improve complementary area header semantics. #58740
Conversation
Size Change: +63 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in 1c2506e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7802382452
|
…s-panel-header-menubar
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Works well. 👍
Fixes #58313
What?
The Styles panel header contains an ARIA
role="menubar"
. That wraps some buttons. The menubar role is incorrectly used because:While the intent of the menubar role added in #51318 was good as it was meant to privide a little more context and an aria-label for the group of buttons, I think this role is incorrectly used for the reasons mentioned above. Also, these buttons are more 'toggle buttons' that toggle other UI parts. They are not command buttons like users would expect in an ARIA rop;e=menu.
Rather, I think the context can be improved by making the visible title in the header a H2 heading.
Why?
ComplementaryArea
component lack some context. By default, the visible title is only wrapped within a<strong>
element, whether it's the defautl header or a custom header:<strong>{ title }</strong>
<strong>{ __( 'Styles' ) }</strong>
How?
I'll create a follow-up to improve the functionality of the
title
andsmallScreenTitle
, which is used in the 'small' header shown on small screens.Testing Instructions
Styles
text before the buttons is now a H2 heading.Testing Instructions for Keyboard
Screenshots or screencast