Closed Bug 1629625 Opened 6 years ago Closed 6 years ago

Image alt texts displayed without explanation

Categories

(Core :: Layout: Images, Video, and HTML Frames, enhancement)

75 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: guy.hickling, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Step 1) While running in the Firefox browser on my desktop PC, I use an email service (Gmail, but most others do it too) which allows me the option to not display images for security reasons.

Step 2) I received emails containing images that have alt texts for screen readers. In this situation Firefox (as other browsers) correctly displays the image alt texts instead of the image. But Firefox doesn't indicate in any way that they are coming from an image, not a part of the surrounding text.

  1. To obtain test data for this you could temporarily sign up to a monthly newsletter from the IAAP at marketing@accessibilityassociation.org as they have alt texts on all images.

Actual results:

I saw apparently random sentences or short paragraphs, without any explanation about what they were for. They were in the same font as the rest of the text, so appeared to be part of the email text. However although they appeared to have some relation to the email subject, but were quite out of place in the surrounding text.

Eventually, after some considerable time, I realised that I was seeing image alt texts, which Firefox was (correctly) displaying instead of the switched-off images, but without giving any explanation.

Expected results:

Firefox should explain what these mystery texts are for, when it displays image alt texts for whatever reason. For instance screen readers for the blind, when they read out an image alt text, they first announce the word "Image" before announcing the alt text, so users who cannot see the image know what is going on.

So it would greatly help Firefox users if Firefox does the same thing. I.e. it should display "Image:" (image followed by a colon) before each alt text, when it cannot display the image for any reason. Then users who have switched off images in their email service will understand what such texts are for and what is causing them.

It would be additional help if Firefox would also display these texts in italics, or a different font, to further distinguish them from the surrounding text (but not instead the displaying "Image:" first which I consider is the most important way to identify that the text is from an image).

NB: Note that this matter is becoming increasingly important as more and more websites that send out mails are now giving images meaningful alt texts, as required by disability law in many countries.
NB 2: The Edge browser displays the image alt text in different font, which helps to tell users that it is something different (but still doesn't explain why).

Component: Untriaged → Layout: Images, Video, and HTML Frames
Product: Firefox → Core

This is per spec. The image can be styled as any other inline element:

data:text/html,This is an <img alt="image">

Maybe we could show a border by default or such, it's unclear if that'd violate the spec or not. Displaying extra text is also a possibility, maybe?

Anne, do you know off-hand how much lee-way do we have here?

Flags: needinfo?(annevk)

It's literally replacement text so if the replacement text isn't adequate that's really the fault of the site (or email). I prefer Firefox's behavior over Chrome/Safari and I'm pretty sure Firefox matches the original intent of the standard, but I guess we could change if we wanted to.

Flags: needinfo?(annevk)

It seems the Chrome folks agrees that Firefox handles this correctly and they plan to make changes to their implementation:
https://bugs.chromium.org/p/chromium/issues/detail?id=948066

So I'm resolving this for now since we're doing the right thing.
Feel free to reopen it / file a new bug if the spec changes.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

Basing your actions on what Chrome is planning to do about styling is incorrect, because:
a) this is not a matter of styling (though as I said, a little styling would help somewhat)
b) Chrome have taken the line thy have about styling because Chrome already does the important bit - it shows a small thumbnail-image icon to indicate that this text is replacing an image. They don't leave their users in the dark as to why they are displaying a strange text that may appear out of place in the middle of all the other text content.

As I said above in the initial bug report, screen readers solve this problem by announcing "Image" before they announce the alt text. That tells their users that the screen reader is announcing some text in place of an image (since they cannot, of course, display images). So when browsers show an alt text, they are in the same position as a screen reader, so should do something similar. Displaying the word "Image:" before the text would be the best solution as it tells people exactly what the text is for. Chrome displays the thumbnail icon, which is helpful though not quite as clear as putting it in text. Edge displays the alt text in a different font, which again tells users there is something different about it. Only Firefox does nothing at all and just leaves its users wondering why the text is there.

Your comment above:

if the replacement text isn't adequate that's really the fault of the site
is not correct because the developers creating alt text should not include "Image" in it, because the screen reader has already announced that. Accessibility auditors and consultants specifically tell developers they must not include "Image" for that reason. Firefox should take the same steps as screen readers to show an image is being replaced. Please re-open this issue and remedy it. Firefox is the only mainstream browser to leave its users n the dark on this one.

You need to log in before you can comment on or make changes to this bug.