Accessibility issue/query: lightboxes

  1. When a lightbox is escaped [esc key/close button pressed], focus should return the element that triggered it in order to not confuse or frustrate the user, especially if they are not sighted. It does not do this, rather it returns to the top of the page.

  2. Triggering a lightbox containing a video should, I think, be triggered via a <button> element rather than an <a>, as it’s an action that occurs without reloading or traveling to a new page? However, even though Cwicly allows the settings for video lightboxs when the trigger HTML element is set to ‘button’, it does not work, due to the lightbox script requiring the url be passed via a href.

Environment info

  • WordPress version: 6.4.1
  • Cwicly Plugin version:
1 Like

Hello @Graphnic,

Thanks for bringing this up.

The Lightbox is currently not our own implementation unlike most of the other JS functionalities in Cwicly. This is something that will be addressed in the near future so that we can guarantee full control over different options and ensure accessibility.

I’m certain we can find a temporary solution for #1. I will take a closer look.

I’m not sure #2 is an accessibility issue - on the contrary - as it ensures that users that might not have js are still able to access the linked image. In any case, I will also take a look at this and see if we can come up with an easy fix.


Thanks @Louis! Good to know there’s a better solution coming. It’s does feel like it lacks control compared to the rest of Cwicly! I really just want to play a video in a modal with a single click.

I’ll bow to your knowledge on #2! I couldn’t find a definitive answer to this TBH. My query was based on the general principle that anchors take you somewhere and buttons trigger something. A screen reader user would be expecting to leave the page as it would be announced as a link? I totally take your point re JS however. Numerous other things would also break without JS of course though :man_shrugging: