-
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
Images alt attribute in an editing context #1520
Comments
One of the reasons we split |
It would definitely be great for non-visual editing. We'll need some verbiage to make sure that it's clear when an in the editor is not what would appear on the front-end. |
See also point 6. in the initial accessibility recommendations: #297
|
This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs. |
Closing as no actionable items here like mentioned in the bugscrub. Let's open specific issues if needed. |
Not sure why this issue was closed, seems to me it's perfectly actionable and it's also part of the initial accessibility recommendation from #297. Considered also the comment from @mtias
To recap:
|
Discussed during today's accessibility bug-scrub, this could be a good first issue. In an editing context, Gutenberg should try to give some feedback about the selected image even if it has an empty alt attribute. for example:
wouldn't be so useful while:
would give, at least, some context. |
Hi @tofumatt , I just noticed this was self assigned to yourself. If you don’t have any work already in progress, I have the bandwidth to get this one finished today. |
I don't think I do, or if I do it's probably ancient. Go for it, thanks! (Feel free to assign me to review it!) |
I've created a PR that should fix this right up. :) The current string from the PR defaults to Are all in favor for this to be the message? I am open to others! @afercia what do you think? |
For the sake of time on my end, I made a new PR that factors in all the recent changes to the image block. Would love a review on #10960 We are still pending on e2e testing for the image block alt attributes, I'd like to propose moving those tests to a separate issue as I am not confident in learning/making tests with my current workload ahead of me. If someone would like to jump on making those tests, I'd really appreciate it. If not, lets try and get this in asap as this is a must have for 5.0 readiness. I've updated the inline-image tests in the PR so those should validate the alt values. The remaining e2e test needed would be for the image block as a whole. |
…dPress#1520' of https://github.com/antpb/gutenberg into add-default-alt-values-to-images-in-editing-context-WordPress#1520
…ndroid-files Generate i18n files for WPAndroid and WPiOS to use
Splitting this out from #1309
One interesting thing we've recently discussed in the accessibility team, during the review of the new media widgets, is the different purpose the alt text has in the front-end and in an editing context (ie. when editing a post).
As a general rule, we all know that (I'll simplify a bit):
alt=""
However, when in an editing context, things are slightly different. Will try to do my best to explain. While editing a post, users need to know what the image they've added is.
When users add an alt text to the image because they want to communicate the image purpose in the front-end, that also serves the purpose to make the image recognizable in the editor.
However, when the image is purely decorative, users will set an empty alt text. That's perfectly correct for the front-end but it will also make the image not recognizable for screen reader users because images with an
alt=""
are just ignored.Ideally, when in the editor, also images intended to use an empty
alt=""
should have something to make them perceivable and announced by screen readers. Not sure about the best option, but maybe this is something worth considering as a nice improvement Gutenberg could bring in.As a reference, the solution implemented for the image widget was to remove the empty alt attribute in the editor when there's no alt value, so at least the filename gets announced. Not sure that's the best available option and maybe we could consider an improved solution.
xwp/wp-core-media-widgets#47
xwp/wp-core-media-widgets#50
The text was updated successfully, but these errors were encountered: