liveBook · Manning

Functional image

As explained in Architecting Accessibility

A functional image is an image that triggers an action rather than conveying standalone information.

A functional image triggers an action, so its accessible name should describe what it does or where it leads—not what it looks like. A magnifying-glass icon that searches needs the name “Search”; a linked logo might need “Home page.” section 3.3.3

Give image links and controls a meaningful accessible name, usually with alt text. For an icon-only button, use alt text on the image or aria-label on the button and treat the image as decorative. Visible text already names a control; avoid aria-label when it could override or duplicate that text. section 3.3.3

<button aria-label="Search"> #A
  <img src="images/search.png" alt=""> #B
</button>

This button names the action with aria-label and keeps its icon from being announced separately. section 3.3.3

An icon can also add useful context, such as warning that a link opens in a new window. If the visible link text already says so, make the icon decorative to prevent duplicate announcements. section 3.3.3

How Architecting Accessibility covers it

How deep it goes
Demonstrates accessible names for image buttons, SVGs, links, and image-submit controls.
Examples
Uses a search icon, a linked logo, an icon-only button, and a new-window indicator.
What you can do after
Apply accessible names to image links and icon-only buttons while avoiding duplicate announcements.
How it connects
Connects alternative text to accessible names, aria-label, decorative images, SVG, and assistive technologies.

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.