Improving Accessibility
-
Hello. The lightbox is initially poorly accessible for people with disabilities. Once the lightbox is open, everything is fine. They navigate the site using the keyboard, specifically the TAB key.
The image focus feature doesn’t work in the plugin. Since the lightbox makes the image an interactive element on the site, navigating with the TAB key should focus the image, and then pressing ENTER should open the image. Unfortunately, this isn’t implemented in the plugin. The image doesn’t take focus.It’s worth considering that if you fix this, a person with disabilities should understand that this is an interactive element when they focus on it. You’ll probably need to add something like this: Then the screen reader will be able to tell it’s a button, meaning it can be clicked, and the aria-label attribute will explain what happens when clicked. It should work something like this: the user focuses on the image using the TAB key, the screen reader informs them that this is the button that will enlarge the image, then the user presses ENTER, and the image opens in a lightbox.
WordPress has a built-in zoom feature for clicking on an image. It’s implemented roughly like this. This makes it much easier for people with disabilities to use interactive website elements. Please see what you can do. Thank you.
You must be logged in to reply to this topic.