SIA-R63<object>
elements have an accessible name
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that <object>
elements have an accessible name.
Applicability
This rule applies to every <object>
element in the HTML namespace that is included in the accessibility tree and embeds a resource whose MIME type is either image, or audio or video.
Expectations
- The element has an accessible name that is not empty.
Assumptions
This rule makes the following assumption:
- The
<object>
element is not used to embed textual content, such as another HTML document. For this purpose, an<iframe>
should instead be used.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Passed
This <object>
element has an accessible name given by its aria-label
attribute.
<object aria-label="A placeholder image" data="foo.jpg" />
Failed
This <object>
element has an empty accessible name.
<object data="foo.jpg" />
Inapplicable
This <object>
element is not included in the accessibility tree:
<object aria-hidden="true" data="foo.jpg" />
There is no <object>
element.
<img aria-label="A placeholder image" src="foo.jpg" />
Implementation details
<object>
elements have no implicit ARIA role, but are nonetheless exposed to assistive technologies by user agents; Alfa thus applies to any<object>
element that is not programmatically hidden.- Alfa does not sniff the MIME type of the embedded resource; instead it relies on both the
type
attribute (if any) and the extension of the filename in thedata
attribute.
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/8fc3b6/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).