惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
L
LINUX DO - 最新话题
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy & Cybersecurity Law Blog
K
Kaspersky official blog
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
WordPress大学
WordPress大学
L
LINUX DO - 热门话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
V
Visual Studio Blog
O
OpenAI News
AI
AI
Hacker News: Ask HN
Hacker News: Ask HN
V2EX - 技术
V2EX - 技术
GbyAI
GbyAI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
S
Schneier on Security
Spread Privacy
Spread Privacy
Y
Y Combinator Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
T
The Blog of Author Tim Ferriss
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
N
News and Events Feed by Topic
Project Zero
Project Zero
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog
G
Google Developers Blog

TetraLogical Blog

Designing for people with reading disabilities - TetraLogical Designing for people who are D/deaf - TetraLogical Designing accessible documents - TetraLogical Introduction to creating accessible documents - TetraLogical Inclusive user research: vulnerable people - TetraLogical Designing for people who are blind - TetraLogical Designing for people with low vision - TetraLogical Meet the team: Niamh Madden - TetraLogical Designing for people with anxiety - TetraLogical Designing for people with disabilities - TetraLogical Accessible building blocks for the web videos - TetraLogical Common accessibility misconceptions - TetraLogical Common misconceptions about testing accessibility - TetraLogical Common misconceptions about implementing accessibility - TetraLogical Common misconceptions about WCAG - TetraLogical Common misconceptions about disability - TetraLogical Meet the team: Grace Snow - TetraLogical Sustainable accessibility in complex organisations: strategic foundations - TetraLogical Sustainable accessibility in complex organisations: organisational realities - TetraLogical Sustainable accessibility in complex organisations: external factors - TetraLogical Common misconceptions about screen readers - TetraLogical Guide to the Inclusive Design Principles - TetraLogical Meet the team: Ian Lloyd - TetraLogical Annotating designs using common language - TetraLogical Meet the team: Catriona Morrison - TetraLogical Championing inclusive language - TetraLogical Press release: TetraLogical launches accessible self-led training courses to help digital teams build confidence in accessibility - TetraLogical Why inclusive products are green products - TetraLogical Accessible Recruitment - TetraLogical Accessibility and the agentic web - TetraLogical Meet the team: Craig Abbott - TetraLogical Foundations: types of assistive technology and adaptive strategies - TetraLogical European Accessibility Act (EAA) FAQ - TetraLogical Screen reader HTML support tables - TetraLogical Interview with Lola Odelola - TetraLogical Understanding EN 17161 Design for All - TetraLogical Inclusive user research: building rapport - TetraLogical Foundations: Keyboard accessibility - TetraLogical Can generative AI write contextual text descriptions? - TetraLogical Understanding the European Accessibility Act (EAA) - TetraLogical Meet Josh: a sportsman who has spinal muscular atrophy - TetraLogical Meet Jonathan: a photographer who has ADHD - TetraLogical Foundations: grouping forms with `<fieldset>` and `<legend>` - TetraLogical XR Accessibility: for people with moving disabilities - TetraLogical Meet Andre: a music producer and blind screen reader user - TetraLogical Foundations: types of disability - TetraLogical Meet Lauren: a film editor who has ADHD - TetraLogical Meet Steve: a photographer who is deaf and low vision - TetraLogical Foundations: form validation and error messages - TetraLogical Meet Hasmukh: a blind cricketer and screen reader user - TetraLogical XR Accessibility: for people with hearing disabilities - TetraLogical XR Accessibility: for people with thinking disabilities - TetraLogical XR Accessibility: for people with seeing disabilities - TetraLogical Introduction to XR Accessibility - TetraLogical Foundations: labelling text fields with input and label - TetraLogical Design patterns and WCAG - TetraLogical Does WCAG 2.2 apply to native apps - TetraLogical Why are my live regions not working? - TetraLogical Building a culture of accessibility - TetraLogical When to use tabindex= Accessibility foundations - TetraLogical Meet the team: Demelza Feltham - TetraLogical Can generative AI help write accessible code? - TetraLogical Meet the team: Steve Faulkner - TetraLogical Meet the team: Gez Lemon - TetraLogical Keyboard accessibility myths and WCAG - TetraLogical Amendment to the Public Sector Accessibility Regulations - TetraLogical What Considerations for TV user interface accessibility - TetraLogical Meet the team: Alistair Duggin - TetraLogical Sticky content: focus in view - TetraLogical The only accessibility specialist in the room - TetraLogical Meet the team: Ian Pouncey - TetraLogical Meet the team: Dean Holden - TetraLogical Meeting WCAG Level AAA - TetraLogical Foundations: accessible names and descriptions - TetraLogical Inclusive XR: accessible augmented reality experiences - TetraLogical Foundations: pointer gestures - TetraLogical Meet the team: Graeme Coleman - TetraLogical Adding sign language to videos - TetraLogical Foundations: introduction to WAI-ARIA - TetraLogical Meet the team: Joe Lamyman - TetraLogical Inclusive XR: accessible 3D experiences - TetraLogical Foundations: visible focus styles - TetraLogical Foundations: target sizes - TetraLogical Meet the team: Henny Swan - TetraLogical Meet the team: Ela Gorla - TetraLogical Foundations: native versus custom components - TetraLogical Foundations: HTML semantics - TetraLogical Accessibility and supporting Internet Explorer - TetraLogical Meet the team: Felicity Miners-Jones - TetraLogical Accessibility and QR codes - TetraLogical Inclusive user research: recruiting participants - TetraLogical Research insight: accessibility of images - TetraLogical Meet the team: Léonie Watson - TetraLogical Android accessibility: roles and TalkBack - TetraLogical Accessible design systems - TetraLogical Meet the team: Patrick H. Lauke - TetraLogical Inclusive user research: analysing findings - TetraLogical How to write user stories for accessibility - TetraLogical
Foundations: text descriptions - TetraLogical
2022-01-24 · via TetraLogical Blog

Posted on by Henny Swan in Design and development

Tags: Foundations, Assistive Technology, Code, WCAG

Text descriptions are primary content, and when images do not have a text description, anyone who cannot see the image will not know its purpose. This means people may be unable to access content or perform related tasks.

Appropriate text descriptions provide the following benefits:

  • People browsing with a desktop screen reader or browsing with a mobile screen reader who cannot see the image can hear and understand its meaning or purpose
  • People browsing with speech recognition can target image buttons and graphical links by including the text description in the voice command if the image doesn't load and the text description is visible
  • People on slow networks where images don't load properly or who have them switched off can read the text description shown in place of the image in some browsers
  • Search engines are better able to index images with text descriptions
A black and white photo of Hasmukh, an older man of South Asian heritage. He is wearing his Metro Blind Sport cricket club shirt, sitting and proudly holding the top of his bat with both hands as the bottom rests on the floor as if he is waiting to go into bat
Hasmukh, a blind cricketer and screen reader user, says "Emails that have graphics with no text descriptions means I can't use them! This is a big problem with meeting invites. I've actually missed a few meetings because I can't read the time or date or find the join meeting button".

Deciding the type of image

The first step is to decide what type of image it is then what kind of text description it needs.

Ask yourself:

  • Does this image convey any information?
  • If this image was removed:
    • Would it affect the meaning of the content?
    • Would it change the user's experience?

If your answer is "No, the image does not convey meaning", it is probably decorative and doesn't need a text description.

If your answer is "yes" in each case, then you may have one of the following types of image, all of which need text descriptions:

  • Functional image
  • Informative image
  • Image of text
  • Complex image

Decorative images

Decorative images are used to improve the visual appearance of the page. They don't convey any information or add to the user experience. Types of decorative images include:

  • Visual styling (borders, spacers, corners)
  • Images which are described by the surrounding text
A screenshot of a decorative separator made up of four coloured circles
Typical example of a decorative image from the footer of the TetraLogical website.

Text descriptions for decorative images

Decorative images do not need text descriptions because they do not convey information or meaning. It is still important to handle decorative images in the right way though.

HTML
Use the alt attribute on the <img> element but do not give it a value: alt="". If a different approach is used to generate images, for example an icon font), apply aria-hidden="true" to the element used for the image.
Android
Use the android:contentDescription attribute on the image view, and set its value to @null
iOS
Set the isAccessibilityElement property on the image to false and do not provide a label

Images of text

Avoid images of text where possible because the visual quality of the text deteriorates for people browsing with screen magnification. If you have to use an image of text, the text description must contain the same words as the image itself.

A 'Sale now on! 25% off all products' image of text.
Typical example of an image of text.

Functional images

Functional images form part of interactive elements like links or buttons. The text description for a functional image should convey the intended action of the interactive element. For example, a button to start a new email might show an icon of a pen, but the text description should be "New email", not "Pen icon" because it's the button's action that's the important information.

A screenshot of an email icon made up of an envelope and a pointing arrow.
Typical example of a functional image forming part of a button (source: Microsoft Outlook)

Informative images

Informative images communicate information or add to the user experience in some way. Types of informative images include:

  • Photos that show people, scenery or objects that add to the experience of the content
  • Pictures of products and product variations
  • Credit card symbols for payment options
A screenshot of a cat followed by the text 'Pets are primarily kept for a person's company, rather than as a working animal. Two of the most popular pets are cats and dogs, but other animals commonly kept include rabbits, gerbils, parrots, fish, and guinea pigs'.
Typical example of an informative image. The image is closely related to the subject matter of the page content but not directly discussed. However, the fact that the image shows a cat means it is strongly recommended that a text alternative is provided - such as "An image of a ginger cat sitting on a kitchen floor".

Text descriptions for images of text, functional and informative images

HTML
Use the alt attribute on the <img> element to add the text description
Android
Use the android:contentDescription on the image view to add the text description
iOS
Use the accessibilityLabel attribute on the image to add the text description

Complex images

Complex images convey detailed, factual information like graphs and charts, illustrations and infographics. The text description must be accompanied by a more extended description or an alternative presentation of the image.

A screenshot of a pie chart that shows the sales at Acme Supermarket for April 2018: 14% Clothing, 16% Electrical goods and 70% food.
Typical example of a complex image, a pie chart.

Text descriptions for complex images

HTML
Use the alt attribute on the <img> element to add a short text description; then either:
  • Use the aria-describedby attribute to point to an element on the same page that contains a longer description of the image
  • Use the <details> and <summary> elements (with the <img> element inside the <summary> element) to create a disclosure component that reveals the longer description on request
Android
Use the android:contentDescription on the image view to add a long text description
iOS
Use the accessibilityLabel attribute on the image to add a long text description

Tips for writing effective text descriptions

Think about how you would describe the image to someone on the phone. Here are some other things to think about:

  • Keep text descriptions short and to the point, no more than a few words is about right
  • Think about the context of the image; the same image may have a different text description depending on how it's context of use
  • Do not use phrases like "picture of…", "image of…" or "… graphic" because screen readers will know it's an image based on the <img> element or the properties of the image in native apps
  • If it's relevant, use phrases like "Illustration of…", "Sketch of…" or "water colour painting of…" because they can help convey the style and nature of the image

More information

Next steps

Read more accessibility foundations posts or sign up for Accessibility Unlocked, our free six-day newsletter series designed to help you kick-start accessibility.