-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative text for short-form video #11080
Comments
[tl;dr: use, I think I think it's best to think about what the element needs as not a text alternative but a programmatic name. For many videos, due to its length and/or complexity, a descriptive transcript is required as a text alternative and the unstructured contents of an attribute cannot accommodate transcripts. (Programmatic associations of longer, structured text alternatives using There multiple ways elements are named. Name from contentsAs noted, the descendent nodes in An argument against making Name from implicit or explicit element associationInputs and buttons can be named implicitly using Some elements are named by descendant elements, An argument against using a descendant element is it wouldn't fit well with the interesting proposal for naming Name from attribute
The problem with If there is a proposal to make the
|
I had a brief chat with my colleague, @stevefaulkner , we suggest using the Test case: Video Accessibility Test The pros:
The cons:
For more complex cases, I am imagining something like a TikTok video containing a recipe or a process, we recommend avoiding |
@DemelzaFeltham This is very helpful, thank you! (I've updated one of my articles with a reference to this comment.) |
I don't really know what I'm doing in VoiceOver, but in my fledgling attempts at a test, it announced https://codepen.io/eeeps/pen/YPzORNP I also tried There is a high likelihood that I am making a basic error. Can anyone with more VoiceOver experience confirm? |
@DemelzaFeltham @eeeps Navigating through your 'pen using VoiceOver (macOS 15.3.2, Safari 18.3.1) element-by-element (VO+right arrow), I could navigate to the I think where |
What problem are you trying to solve?
To provide alternative text for an animated image sequence, you can use the
alt
attribute:These days, video is often preferable. The quality is higher, the file size is smaller, and the viewer gains playback controls. You can achieve similar behavior to animated GIFs through a combination of preferences:
But there isn't a straightforward replacement for the
alt
attribute. (This has been the most common point of confusion in response to a talk on modern-day GIF-like animations I presented last year.)Animated GIFs may or may not be declining in popularity, but this need would also apply to more modern short-form video content (the style popularized by TikTok, YouTube Shorts, etc.). These clips are short in length, often with text-based captions that would make them comparable to a GIF or meme in terms of summarization needs.
What solutions exist today?
Some authors incorrectly assume fallback content will work, but that only applies to browsers that don't support
<video>
.Another common suggestion is to use captions and subtitles, but those are comparatively time-consuming to generate, and are intended to accompany the media rather than provide a complete alternative.
The most concise and
alt
-like current solution is to usearia-label
(oraria-description
):But this is only reliable when the
controls
attribute is present. It may also run afoul of automated translation.You could replace that with
aria-labelledby
(oraria-describedby
):But in addition to requiring the
controls
attribute as before, you now need a separate element with a corresponding ID, and you'll likely need to manage the extra element's visibility somehow.The simplest solution may be a figure and caption:
But this introduces two new elements, and may require visibility of the caption to be managed.
Some browsers support video in
<img>
elements:But aside from inconsistent support, this requires the author choose between supplying alternative text or providing playback controls.
How would you solve it?
I would include the
alt
attribute as a feature of<video>
:For consistency with #6627, this could also apply to individual
<source>
elements:And it would be great for the feature to play nicely with #7954, so there's clarity when
alt
text applies to poster images versus the media itself.Anything else?
No response
The text was updated successfully, but these errors were encountered: