jQuery colorbox doesn't get focus in full-size view (element type "image")
Affected version(s)
4.13, 5.3 and 5.4
Description
When using the content element "image" and launching the full-size view the full size colorbox doesn't get the focus. This might be an issue concerning acessibility as the close-button cannot be focused with the tab key.
Checked this in the Contao demo by inserting a single image. In the content element "gallery" instead it works fine and the focus jumps inside the colorbox.
Checked in Contao 4.13, 5.3 and 5.4.
Checked this on Jack Moore's Colorbox Demonstration: Here it seems to work fine with colorboxes from single elements.
I cannot reproduce the issue. Reproduction I tried in Contao 4.13:
- Enabled Include jQuery in the page layout.
- Enabled the
j_colorboxtemplate. - Created a content element of type
image. - Selected an image and enabled Full-size view/new window.
- Opened the front end.
- Clicked on the image to open the full size image in the Colorbox.
- Pressed Tab once.
The close button was selected.
I also see no reason why this could somehow be caused by Contao or its default j_colorbox template.
That's what I exactly did in the official Contao demo. Tested with Firefox and Chrome. Furthermore this was an issue which had been remarked from some external auditors for accessibility in some Contao websites (those without any further extensions).
Tested right now again in official demo. The focus walks through all elements (including page footer) until it reaches finally the colorbox. But it should jump there directly when launching the colorbox, I think.
Yes, I can reproduce it, if other focusable elements come after the image.
But again: this is not related to Contao itself. It looks like the trapFocus feature of Colorbox is not working correctly or as intended. You'd have to report that here - but Colorbox hasn't received a new release since 2016.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.