object-alt
<object>
elements must have alternative text.
Description
The <object>
HTML element serves various purposes such as displaying images, embedding browsing contexts, or handling plugins. To ensure accessibility, it is important to provide a text alternative for the <object>
element so that screen reader users can understand its content. This text alternative, known as an accessible name, should accurately describe the contents of the <object>
. However, if the <object>
element is purely presentational and doesn’t require accessibility, you can use role="none"
or role="presentation"
to remove it from the accessibility tree.
Why is it important?
Screen readers rely on alternative text to convey the meaning of non-text content to users, as they are unable to directly interpret such content. When it comes to embedded object elements, it is crucial to provide short and descriptive alternative text. This ensures that screen reader users can obtain the information contained within these elements. The alternative text should accurately convey the intent, purpose, and meaning of the image, allowing assistive technologies to effectively communicate it to users.
Examples
-
Success:
-
<object>
element has a non-emptyaria-label
attribute.
-
-
Failure:
-
<object>
element has no alternative text.
-
How to fix?
Each <object>
element can provide alternative text using one of the methods -
- An
aria-labelledby
attribute that references elements that are visible to screen readers. - A non-empty
title
attribute - A non-empty
aria-label
attribute
Tags
cat.text-alternatives, wcag2a, wcag111, section508, section508.22.a
References
- WCAG 1.1.1: Non-text Content
- Deque University: object-alt
- Accessibility Insights: object-alt
- Evinced Digital Accessibility Knowledge Base: object-alt
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!