0

In many answers I've read here, there are conflicting opinions on the niche cases when alt text should or should not be added to an image. So what are the situations in which is is better not to add alt text to an image?

Here are a few situations I can think of when it might not necessarily be a good idea to add alt text (but these are just examples):

  • When the image is abstract (doesn't represent anything meaningful in particular)
  • When the author of the page doesn't have time to write good alt text (so any alt text they write will be poor)
  • When the image is just an universal icon (e.g. a magnifying glass icon next to a "search" label)
  • When the image only loosely represents a feeling / mood rather than representing the content it is above / next to (so that it might visually be connected to the content but the connection is confusing when written / read aloud)
  • When the image is purely for style (e.g. decorative borders)

These are some of the scenarios we've discovered in my team at a university publishing scientific literature for the general public.

Perhaps alt text should be added in every one of these cases; or maybe the answer is "it depends" in each case. And if it depends, then on what does it depend?

1
  • One of the main reasons for Alt text is for people with low/no vision. If you don't put any alt text at all (meaning you don't even do alt="" then their screenreader will just read out 'Image'. They have no way to know its a decorative image, an abstract one or that the author 'didn't have time to write it'. They just get told there's an image at that point in the text but with absolutely no context as to what that is. That's a poor experience and breaches accessibility guidelines (so you'll fail any audits your site goes through).
    – JonW
    Commented yesterday

3 Answers 3

2

Welcome to the site, with this slightly controversial question. I thought "none", and was curious to read your examples:

  • When the image is abstract (doesn't represent anything meaningful in particular) - Why do you have an image here in the first place? And if the author thinks it's nice, why not add "three diagonal stripes in different reds" as alt text? Why leave blind people wondering if there is some meaning hidden in an image without alt text?

  • When the author of the page doesn't have time to write good alt text (so any alt text they write will be poor) - (This is not quite a serious answer) Under this assumption, why do you assume the rest of the page is written well? Shouldn't the alt text be as important as, say, the title or the summary?

  • When the image is just an universal icon (e.g. a magnifying glass icon next to a "search" label) - Then, definitely add an explanation (typically a tooltip which also poses as alt text)!

  • When the image only loosely represents a feeling / mood rather than representing the content it is above / next to (so that it might visually be connected to the content but the connection is confusing when written / read aloud) - Without an example, I have a hard time to understand this case. What comes to mind is the attempt to describe the intended effect of music in transcription - think of "(ominous music)". Why not try to explicate this intent in the alt text (and then think about whether it's really the intent).

  • When the image is purely for style (e.g. decorative borders) - This sounds similar to the above bullet. I think (because I never use them) decorative borders try to convey a style which can also by explicated with an alt text.

2
  • Thanks! I can now take these back to my team to answer their questions 😄 And thanks for the welcome! I realise this question is a bit controversial, but I thought it was important enough to ask.. Commented Nov 9 at 9:59
  • 1
    A rule of thumb I've heard before is 'write your alt text BEFORE picking the image'. Because it ensures you're not just dropping images in for the sake of it. Everything has a purpose.
    – JonW
    Commented yesterday
2

The Bureau of Internet Accessibility (BOIA) has a great article called When Should I Use Empty (or Null) Alt Text Attributes?.

Many web authors mistakenly believe that alternative text (also called alt text or alt tags) should be applied to every single image on a website. That’s not the case; some images are decorative, and they don’t need alt text. That’s addressed in the very first requirement of the Web Content Accessibility Guidelines (WCAG), the international standards for digital accessibility.

When an image is decorative, it still needs an empty (or null) alt text tag. That instructs screen readers and other assistive technologies to ignore the image (or announce it as decorative, depending on the user’s verbosity settings).

Here’s what null alt text looks like: <image src=”apple.jpg" alt=””>

Note that the alt text attribute is still there — there’s just nothing in it. This tells assistive software that the image can be safely ignored without depriving the user of anything important.

If an image is decorative, why can't I write "decorative" in the alt text?

Because if an image is truly decorative, the user won’t want to hear about it. They’d rather just ignore it entirely.

Unnecessary noise is a major issue for screen reader users. If their software announces every single element on the page — including things like dividers and borders — they may have trouble staying focused. They might get confused, and they’ll almost certainly feel frustrated.

How do I know whether an image is truly decorative?

Determining whether an image is decorative requires some judgment, but as a quick rule of thumb, you can try this exercise: Imagine that you’re describing your website to a friend over the phone. Would you explain the contents of the image to your friend, or would you skip it?

You can also ask a few other quick questions about the image:

  • Is it part of the page’s visual styling? If so, it’s probably decorative.
  • Is it already identified and described by nearby text (such as captions)? If so, additional alt text is unnecessary.
  • Does the image communicate anything important to the user? If not, it’s probably decorative.

If you’re still unsure, think about it from a screen reader user’s perspective. Try to determine how alt text (or null alt text) would affect their actual on-page experience.

Can I just leave out the alt attribute entirely?

That’s a logical idea, but no — some screen readers will announce that the alt attribute is missing. Others might use the image’s filename as a stand-in for the missing alt text.

1

I find this tree from w3 very useful

W3 - alt text decision tree

But as general rule try to use alt text when it makes sense for the user to be knowing about what a certain image represents or if the image’s alt text would function as a label for a control, otherwise make it decorative to avoid extra noise for screen reader users.

New contributor
claurennt is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.