SIA-R43<svg> element with explicit role has non-empty accessible name

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that each SVG image element that is explicitly included in the accessibility tree has a non-empty accessible name.

Applicability

This rule applies to every element in the SVG namespace with an explicit semantic role of either img, graphics-document, graphics-symbol, that is included in the accessibility tree.

Expectations

  1. Each target element has an accessible name that is not empty.

Assumptions

This rule assumes that the presence of one of the roles outlined in the applicability indicates the authors intent to include the element in the accessibility tree and thus convey information to the user about that element.

Accessibility support

The HTML Accessibility API Mappings specify that the <svg> element has an implicit role of graphics-document. However browser support for the graphics-document role and the SVG Accessibility API Mappings is inconsistent.

This rule is limited to the explicit use of roles, as a clear indication that content should convey meaning, until the SVG Accessibility API Mappings is more stable and browser support is more consistent.

Browser and assistive technology support for SVG <title> and <desc> elements is currently inconsistent. Using WAI-ARIA in combination with the img role for non-decorative <svg> elements significantly improves accessibility browser support.

Until browser support for the SVG Accessibility API Mappings is more consistent it is recommended to explicitly remove decorative <svg> elements from the accessibility tree.

Examples

Acknowledgments

This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/7d6734/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).