-
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 Replace featured image button perceivable by assistive technologies #57453
Make the Replace featured image button perceivable by assistive technologies #57453
Conversation
Size Change: -7 B (0%) Total Size: 1.69 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 think this change certainly makes sense.
I tested it with NVDA on Windows. When I press the Tab key while the Featured Image panel button is in focus, the screen reader read the following.
trunk:
Featured image button expanded heading level 2
Edit or replace the image button The current image has no alternative text. The file name is: test-3.jpg
blank
clickable main landmark Editor settings region Post property page Remove button
This PR:
Featured image button expanded heading level 2
Edit or replace the image button The current image has no alternative text. The file name is: test-3.jpg
Replace button
Remove button
It is worth noting that in NVDA, the way the Remove button is read out has also changed, but I think this is originally correct.
@t-hamano thanks for your review. Yeah, |
Fixes #57451
Follow-up to #50269
What?
The featured image 'Replace' button is (intentionally) hidden from assistive technology via an
aria-hidden="true"
attribute. This is not recommended as the button is still focusable and in the tab sequence.Why?
There is no good way to hide interactive controls from assistive technologies and it's not recommended to do tha tin the first place. Generally, controls that are visually presented to users should also be available to screen reader users. Controls that are in the Tab sequence should never use
aria-hidden="true"
.How?
Remove
aria-hidden="true"
from the Replace button.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast