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

Accessibility: Element ID is not unique #428

Closed
kevinkidwell opened this issue Feb 10, 2021 · 9 comments
Closed

Accessibility: Element ID is not unique #428

kevinkidwell opened this issue Feb 10, 2021 · 9 comments

Comments

@kevinkidwell
Copy link

Description
Any element on a page must have a unique ID. This issue appears when items on a page both have the same ID, typically from embeds or other generated templates that can be repeated.

This particular issue is present on the Item Embed on the controls for an item: zoom in, zoom out, home, and fullscreen.

Solution
Option 1: Do not allow multiple item embeds on a single page.
Option 2: Remove the IDs and adjust any relevant code that referred to these IDs

@mhk33
Copy link
Collaborator

mhk33 commented Jul 2, 2021

This also appears on the 3.1.0 crawl:
https://my2.siteimprove.com/Accessibility/1067132/Pages/Issue?CheckId=33&CriterionChapter=1.3.1

id="content" is used twice.

@mhk33
Copy link
Collaborator

mhk33 commented Jul 7, 2021

This should now be fixed per #456, I re-crawled one page in SiteImprove and the error went away. Will close this once SI does a full crawl and I can confirm that the issue is gone.

@mhk33 mhk33 removed their assignment Oct 7, 2021
@mhk33
Copy link
Collaborator

mhk33 commented Oct 7, 2021

The repeating id="content" code has been cleaned out of the template, but this issue is still being flagged for multiple viewers on a page. I'm not sure how we get around this built-in functionality.

@kevinkidwell
Copy link
Author

The issue that is still here with this is in relation to the zoomable images that can be embedded on a page. OpenSeadragon requires an ID be passed to it for the functionality to work. Since these are dynamically generated, all of them have the same ID from the template.

To make this work, we would need either unique IDs for all of these buttons when they're generated or to remove the ability to zoom on these embeds.

@kevinkidwell
Copy link
Author

The toolbar controls buttons were being created in the Blacklight Gallery gem. I copied the template over and removed the control pieces to be able to fix this issue. The only problem now is that the images can still zoom on scroll/click. Would we want to disable this or leave it as is?

@mhk33
Copy link
Collaborator

mhk33 commented Jan 11, 2022

@kevinkidwell Does it seem awkward that you can zoom with scroll/click? Seems like it might be, like surprise functionality that should be more obvious if it's there.

@kevinkidwell
Copy link
Author

@mhk33 I find it super odd to have that functionality but I couldn't figure out a way to remove/disable it or make the functionality work with a class instead of ID.

@elrayle this may be another thing that needs to be done at either the Blacklight Gallery or OpenSeadragon level.

@chrisrlc
Copy link
Collaborator

This is fixed on prod now (was related to osd viewer).

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

No branches or pull requests

4 participants