-
Notifications
You must be signed in to change notification settings - Fork 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
Editor: Accessibility: the alt attribute for images should not be auto-filled #335
Comments
Noting that this behavior is consistent with wp-admin. Specifically, when uploading a new image, the "Title" field is prepopulated with the base filename. When inserting an image to the post editor, both wp-admin and the Calypso editor will fall back to the title if an alt is not assigned. If we were to change the behavior here, I'd recommend still allowing the title to be defaulted to the filename, though not fall back to the title in generating the markup. |
Perhaps we could auto-fill the alt field with the title only if the image had a custom title in the meta? |
#bug-scrub #pre-gutenburg-bug-purge Closing due to inactivity and because it is a minor issue. Please re-open if it comes up again! |
When an image is added and the alt text field is not modified, the filename is used by default:
<img class="alignnone size-large wp-image-2507" src="https://madefortesting426.files.wordpress.com/2015/11/img_2539.jpg?w=1024" alt="IMG_2539" width="1024" height="768" />
The
alt="IMG_2539"
part is not descriptive of the image's content and not helpful to screen readers and so it hinders accessibility to auto-fill it with possibly irrelevant data. It would be better to leave the attribute empty than pre-filling it.— https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
/cc davidakennedy (to make sure this recommendation is good re: accessibility best practices)
/hat tip kathrynwp for reporting this issue in Slack
From davidakennedy
The text was updated successfully, but these errors were encountered: