Add an aria label to the site save dialog#47898
Conversation
|
Size Change: +21 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 469ab7a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4131439375
|
alexstine
left a comment
There was a problem hiding this comment.
@glendaviesnz Thanks for the PR.
Not a huge fan that dialogs could not have headings. This is really an anti-pattern in my opinion.
With that aside, one small edit so screen readers read this properly. I know, your version is also correct English but screen readers are picky.
Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com>
Thanks for the input @alexstine. I have noted on #47885 that with an immediate fix for 6.2 merged we could now repurpose that issue to focus on the question of titles in dialogs more generally. |
|
I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: d4c6581 |
* Add an aria label to the site save dialog * Update wording Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com> --------- Co-authored-by: Kai Hao <kevin830726@gmail.com> Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com>
What?
Adds an
aria-labelto the site save dialogWhy?
It doesn't currently have one, and also has no heading, so should have the aria-label as a minimum, while options for retaining heading but visually hidden when
__experimentalHideHeaderis set are explored.Part of fix for #47885
How?
Adds the
contentLabelprop which is converted by the component into an aria-labelTesting Instructions
Make some changes in the site editor and return to browser mode without saving them
Click on save button at bottom of left panel
Check that the save dialog has an aria label
Screenshots or screencast
Before:

After: