Skip to content

Chapter 7 of 8

Content Semantics and Structure

Images require thoughtful alternative text so that screen-reader users receive equivalent information. The "alt attribute decision tree" guides choices: a purely decorative image should have alt="" so assistive technology skips it; an image conveying information should have alt text describing it; a functional image (such as one acting as a link or button) should have alt describing the action rather than the picture itself; and a complex image may use a short alt plus a longer description elsewhere. Empty alt="" tells assistive technology to skip the image as decorative while it remains rendered visually.

For an icon inside a button, the recommended pattern is to give the button an aria-label such as "Close" and mark the icon span aria-hidden="true" so the icon is not double-announced. An `` containing only an `` icon and no text fails accessibility unless it has an aria-label or visually-hidden text. Authors should never rely on the title attribute for accessible names, because title has poor and inconsistent screen-reader support and is only shown on hover, leaving keyboard and touch users unable to use it. WCAG 2.5.3 "Label in Name" requires that for any control with visible text, the accessible name must contain that visible text (case-insensitively), so voice-control users saying "click Sign up" hit the right button; showing "Sign up with Google" visually while coding aria-label="Google" is an anti-pattern that fails this criterion. role="img" applied to non-`` elements also requires an accessible name via aria-label, aria-labelledby, or alt on a related element, or the image is announced as "image" with no description, failing WCAG 1.1.1.

Accessible tables rely on proper semantic structure: a real `

` with ``, ``, `
`, `
`, and `` cells. The scope attribute associates a header with all cells in its column or row. For multi-level or irregular tables, id and headers attributes explicitly associate data cells with their header cells. Data tables should not be used for layout; layout tables should use role="presentation" so their structure is not exposed as tabular data.

Headings and labels guide screen-reader users who skim content by jumping from heading to heading. Headings should not skip levels when moving from h1 to h3 without an intervening h2, per WCAG 1.3.1 and 2.4.6. The "Headings and Labels" criterion requires that headings and labels describe the topic or purpose of their section or control; vague labels like "More" without context are insufficient. Similarly, every link's accessible name should make its destination clear out of context per WCAG 2.4.4; "click here" fails because the destination is unclear.

All chapters
  1. 1Foundations of Web Accessibility
  2. 2ARIA Fundamentals
  3. 3Keyboard Interaction and Focus
  4. 4Live Regions and Modal Dialogs
  5. 5Common Widget Patterns
  6. 6Forms, Buttons, and Controls
  7. 7Content Semantics and Structure
  8. 8Advanced Patterns and Practices

Drill it

Reading is not remembering. These come from the Accessibility Aria Patterns deck:

Q

What does the acronym "a11y" stand for in web development?

"a11y" is a numeronym for "accessibility" — 'a' + 11 letters + 'y'.

Q

What is the difference between web accessibility (a11y) and usability?

Accessibility means people with disabilities can perceive, understand, navigate, and interact with the web. Usability is the broader quality of a design being e...

Q

Which four disability categories does WCAG primarily address?

Visual, auditory, physical/motor, and cognitive/neurological disabilities.

Q

Name the three conformance levels defined by WCAG 2.1.

A (lowest), AA (mid), and AAA (highest).

LearnCoachAssist

Free flashcards for any subject. Powered by spaced repetition to help you learn faster and retain more.

© 2026 LearnCoachAssist. Free flashcard learning for everyone. ·