object-text-alternative-present
<object> must provide a text alternative
Checks that <object> elements provide a text alternative via fallback content or an accessible name.
Applies to. Applies to <object> elements included in the accessibility tree. Hidden objects are excluded whether or not they are focusable. role="presentation"/role="none" are excluded only when not focusable. An object whose type attribute, or failing that its data URL's file extension, names a resource that is not an image, audio or video (an HTML page, a PDF, plain text) is excluded too: it renders no non-text content, so 1.1.1 asks nothing of it (ACT 8fc3b6's applicability). An object whose type cannot be told from markup stays in scope. A Flash object (type="application/x-shockwave-flash", or with no type a data URL ending in .swf) is excluded too: no current browser runs Flash (support ended in 2021), so the object draws nothing itself and the browser shows its fallback content, ordinary HTML the other rules judge. Nothing non-text is left for 1.1.1 (ACT 8fc3b6).
Expectation. Each applicable <object> provides a text alternative via:
- fallback content (non-empty text content inside <object>), OR
- an accessible name (aria-labelledby/aria-label), OR
- a title attribute (best-effort fallback).
Examples
<object data="chart.svg" type="image/svg+xml">Sales chart for 2024</object>
Fallback content between the tags counts as a text alternative.
<object data="chart.svg" type="image/svg+xml"></object>
No fallback content and no accessible name.