Errors and field information are not associated with their control #15302
Labels
[Feature] Media
Anything that impacts the experience of managing media
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] WP Core Ticket
Requires an upstream change from WordPress. Core Trac ticket should be linked.
Projects
Errors and field information are not associated with their control
Issue description
When users attempt to upload an image in the "Featured Image" modal
dialog, and the image is too large, an error message appears visibly.
However blind and low-vision users are not alerted with the
announcement, and focus remains on the upload button (except in Edge
browser, where focus goes back to the top of the page after a failed
upload).
The 2MB limit is also not programmatically associated with the "Select
Files" button, so blind and low-vision users may miss that limit unless
they happen to navigate past the button in exploration of the whole
modal.
Users who are zoomed-in or using magnification software may not see the
error as it may be outside their viewports. Screen reader users remain
on the "Select Files" button and need to navigate around to see if
there are any errors or if the upload was successful.
[
]{.image-wrap}
Issue Code
Remediation Guidance
Put
role=alert
on the error, and on any additional error or successmessages that are added as users upload media. This will allow screen
reader users to know immediately that there is an error.
Consider moving focus to either the error container or the error
container close button when the error appears. This will ensure that
Braille-only and screen magnification users are alerted that an error
has occurred.
Normally, moving focus to errors like this is not advised, however
currently the error and the informative text are visually far away from
the "Select Files" button, and neither Braille nor screen
magnification software announce status messages. A better solution is to
change the design to bring the error visually directly under the
"Select Files" button (while still also using a live region on the
error message).
Programmatically associate the informative text ("max 2MB size") with
the "Select Files" button using
aria-labelledby
. Do this by givingthe informative text container an
id
value and set this in order inan
aria-labelledby
attribute on the "Select Files" button. Includethe button's own
id
token in thearia-labellebdy
so that thebutton's text isn't overridden.
Recommended Code
Relevant standards
(Level A)
(Level A)
(Level A)
(Level A)
Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-60 in Tenon's report
The text was updated successfully, but these errors were encountered: