JFK's "We Choose the Moon" speech excerpt is courtesy of NASA.
Applicability
This rule applies to any object element for which all the following are true:
The object element is included in the accessibility tree; and
The object element has no explicit role; and
The object element embeds a resource whose MIME type is either image, or audio or video.
Expectation
Each target element has an accessible name that is not empty ("").
Background
Testing that the accessible name describes the purpose of the object element is not part of this rule and must be tested separately.
When the object resource is not loaded, the fallback content, if present, is rendered as shown in the Inapplicable Example: "This object element does not need an accessible name because it loads no image, audio, or video.". When screen readers encounter an unsupported media format they will also use the fallback content instead of other attributes.
Assumptions
There are currently no assumptions
Accessibility Support
Some screen readers announce object elements even if they do not have an accessible name, while other skip the element. If an object is used to render decorative content, to ensure it is marked as decorative and can be ignored by all major screen readers a presentational role is necessary.
The MIME type of the resource embedded in the data attribute impacts how the accessible name of the object is computed. For example, object embedding image MIME type may use their alt attribute to compute their accessible name, but object embedding audio or video MIME types may not. An object does not officially support the use of an alt so this may behave differently according to the browser used.
This object element which embeds an audio resource has an empty accessible name because it does not provide an accessible name through one of title, aria-label or aria-labelledby attributes.
This object element does not need an accessible name because it loads no image, audio, or video. Instead the img element inside the object is rendered.