Hide audio thumbnail from screen readers#5570
Open
rushikeshmore wants to merge 1 commit into
Open
Conversation
The audio thumbnail (both the generative SVG fallback and the cover art image) is purely decorative and provides no useful information to screen reader users. The previous title and alt attributes were misleading, especially for the generative covers which displayed "Cover art for ..." when no actual cover art existed. Add aria-hidden="true" to the thumbnail wrapper, remove the title attribute, and set alt="" on the image element. This follows the approach agreed upon in the issue discussion.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes #497 by @dhruvkb
Description
The audio thumbnail component (
VAudioThumbnail) previously used atitleattribute on the wrapper and a dynamicalttext on the<img>element. This was misleading because:titleread "Cover art for ..."title/alttext duplicated information already available in the audio track metadata nearbyFollowing the approach agreed upon in the issue discussion, this PR:
aria-hidden="true"to the thumbnail wrapper<div>, hiding the entire element from the accessibility tree:titlebinding from the wrapperalt=""on the<img>element (empty alt for decorative images per WCAG)helpTextcomputed property anduseI18nimportTesting Instructions
aria-hidden="true"is present on the wrapper div<img>element hasalt=""titleattribute on the thumbnail wrapperChecklist
Update index.md).main) or a parent feature branch.ov just catalog/generate-docsfor catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-propsfor the catalog or
ov just api/generate-docsfor the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin
I have read and agree to the Developer Certificate of Origin version 1.1.