-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add better ARIA labels to toggle buttons in Summary panel #42114
Conversation
Size Change: +791 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
export default function PostURLLabel() { | ||
return usePostURLLabel(); | ||
} |
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.
Should we remove this component? It's not used by core anymore.
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.
We can't without breaking backwards compatibility—it's exported from @wordpress/editor
. I think it's fine to support both a component version and a hook version of these labels. It's a bit like how we have both withSelect
and useSelect
.
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.
This tests well for me. Thanks, @noisysocks!
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.
@noisysocks Awesome, thanks!
packages/edit-post/src/components/sidebar/post-visibility/index.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Alex Stine <[email protected]>
Thanks @Mamaduka and @alexstine! |
What?
Updates the ARIA labels for the toggle buttons in Document Settings → Summary to be more descriptive of what the button does.
Why?
A screen reader currently reads the buttons like so:
I think this is pretty confusing as the first three labels do not describe what pressing the button actually does.
How?
This PR changes the labels so that they read:
Testing Instructions