lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.2k stars 1.77k forks source link

Accessibility issues (WCAG compliance) #708

Open pucicu opened 3 years ago

pucicu commented 3 years ago

I know it is not a real bug, but it is something that can easily be changed in the code.

The current (and previous) versions of lightbox violate some of the standards for good web accessibility. For example, alt text seems sometimes be missing to some control images (I could not check this with the latest version), or links should not directly target images (this is for sure a problem with the current version).

This can be easily tested, e.g., using https://www.webaccessibility.com/ or http://checkers.eiii.eu/

It would be great if lightbox could be modified in a way that it complies to WCAG. Thanks!

cbranner commented 3 years ago

I'd like to add to this. The trigger I'm getting is that a landmark is missing for the lightbox. I found that adding 'role="complementary"' to the <div id="lightbox"...> seems to take care of it. This would be a great modification and help with our compliance to WCAG when using this nice plugin. Thanks!