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

Missing ALT attribute on rendered IMG tag #2944

Open
benishs opened this issue Dec 7, 2023 · 0 comments
Open

Missing ALT attribute on rendered IMG tag #2944

benishs opened this issue Dec 7, 2023 · 0 comments

Comments

@benishs
Copy link

benishs commented Dec 7, 2023

The video player seems to be dynamically writing an img tag without an alt attribute – for example:

<div class="mejs__poster mejs__layer" style="background-image: url("&quot;"/assets/vid/poster.jpg"&quot;"); width: 100%; height: 100%;">
  <img class="mejs__poster-img" width="0" height="0" src="/assets/vid/poster.jpg">
</div>

Screen capture here.

It's my understanding all img tags should have an alt attribute for accessibility reasons, even if it's an empty alt, and this missing attribute is causing an error in a site audit tool I'm using.

I found this, which seems to address the issue: #1534
but I'm actually not seeing the alt attribute in my video player. I thought maybe my version of MediaElement is out of date, but that merged pull request is from 2015 (way before we started using MediaElement).

Then I thought maybe we just configured something wrong (although it seems like it should use an empty alt at a minimum) but I noticed there is no alt attribute on the img tag on the example video on https://www.mediaelementjs.com/ https://go.benish.io/sdY5shvs

I couldn't find anything in the documentation about needing to do anything to enable the alt attribute – am I missing something, or is this a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant