Skip to content
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

video don't use alt-attribute #5418

Open
aschei opened this issue Sep 19, 2024 · 3 comments
Open

video don't use alt-attribute #5418

aschei opened this issue Sep 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@aschei
Copy link

aschei commented Sep 19, 2024

Describe the bug
Embedding a video with an alt-text will be rendered using the structure

<figure>
  <video/>
  <figcaption>(alt text goes here)</figcaption>
</figure>

Screenreaders handle alt-attributes quite nicely and struggle with the figcaption-Element (which also has a different meaning as the alt-attribute).
The alt-text should go into an alt-attribute at the video-Element.

To Reproduce

Steps to reproduce the behavior:

  1. Post a video with an alt-text
  2. Look at the source code of the post.

Expected behavior

the <video> element should contain the alt-text in the alt-attribute.

Details

  • Platform: desktop
  • Platform version: current
  • App version:
@aschei aschei added the bug Something isn't working label Sep 19, 2024
@mozzius
Copy link
Member

mozzius commented Sep 19, 2024

Hi! I wasn't sure what the correct way to provide alt text for a video is - <video> does not support the alt attribute. Would aria-label be more suitable than a <figcaption>?

@aschei
Copy link
Author

aschei commented Sep 19, 2024

Thx, @mozzius for looking into this, much appreciated. I did a little research, and you are right, alt-tag is unfortunately not suitable for the video tag.
There is <track kind="description" sub element as the perfect way to support visually impaired users, but it requires an audio track describing the video - not text.

I suggest to follow "Example 1" here: https://www.w3.org/WAI/standards-guidelines/act/rules/c3232f/proposed/
(Simply add the description below the video in text element.)

With css-styling this can be done in a way that does not limit other users (e.g. having a small "ALT" tag that shows the description on click or something).

Other than that I will check with visually impaired people in my bubble if they can refer to perfect examples of videos with screen-reader-compatible textual descriptions in other community driven platforms.

Looking forward, you guys are awesome.

@mozzius
Copy link
Member

mozzius commented Sep 19, 2024

Yeah - is just the subtitles, which we support in addition the alt field. Thank you for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants