-
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
Fix accessibility of the Classic block modal dialog #50384
Conversation
Note: of course, there are edge cases with very small viewports and especially very short heights. In these edge cases the Cancel/Save buttons may not be fully usable but the classic editor wouldn't be that usable as well, as the edit area becomes too small to be used. I'd say this is more a limitation of the modal dialog itself. |
Size Change: +284 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
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.
I smoke-tested this and reviewed the code, it looks OK to me!
It does what it's supposed to do, fixes the a11y issue and makes this popover more consistent with other instances.
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 really well. 🚢
Fixes #50161
What?
FIxes the accessibility of the Classic block modal dialog. Also improves labeling and design consistency.
Why?
The modal dialog misses some important accessibility features. Keyboard interaction is broken, labeling is incorrect, etc.
Also improves design consistency with other modal dialogs.
How?
useFocusOutside
hook.tertiary
for consistency.Testing Instructions
aria-labelledby
attribute that points to the dialog heading.Screenshot of a template toolbar:
tertiary
button, with blue text, like in other dialogs e,g, the Block Lock one.Testing Instructions for Keyboard
See above.
Screenshots or screencast