Skip to content

Accessibility issue: keyboard users potentially stopped from accessing sidebar #1069

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

Closed
scoutb-cogapp opened this issue Aug 12, 2024 · 5 comments · Fixed by #1171
Closed

Comments

@scoutb-cogapp
Copy link

UV version: [email protected]

I'm submitting a: bug report => please fork one of these codesandbox examples with a repro of your issue and include a link to it below

Page area

information sidebar

Issue description

The sidebar is made to fit the size of the image viewer which means that it becomes scrollable when the content outgrows the space given. This scrolling needs to be possible for keyboard users. As long as there is at least one link (or other focusable item) inside the sidebar, this is no problem: the user tabs to this item and then they can use the up and down keys to scroll. However, if there is no focusable item inside, there is no way for a user to tab into or otherwise access the sidebar and they won't be able to read the whole content.

Note that the same issue applies to the sidebar modal (the box that pops up when users activate the info icon on slim screens where there is no space for the sidebar). But i expect the fix is in the same place and will apply to both.

Steps to reproduce

  1. open this manifest. This should have a sidebar with enough content to require scrolling.
  2. Ensure there are no links in the right-hand sidebar (remove any links using browser devtools)
  3. Attempt use keyboard navigation to scroll the sidebar to view the whole content.

Expected behaviour

Keyboard users can view the whole sidebar even if it doesn't contain any links.

Possible fix

Include the sidebar in the tab index. That way a keyboard user will be able to interact with it even when there are no other focusable elements inside.

WCAG criterion

2.1.1 Keyboard (Level A)

Related code

<div class="rightPanel" style="width: 255px; height: 695.466px; left: 1099px;"><div class="top" style="" aria-hidden="false"><h2 class="title">More Information</h2><a class="expandFullButton" tabindex="0"></a><div role="button" class="collapseButton" tabindex="0" title="Collapse Information"></div></div><div class="closed" aria-hidden="true" style="display: none;"><a role="button" class="expandButton" tabindex="0" title="Expand Information"></a><a class="title">More Information</a></div><div class="main" style="height: 650.455px;" aria-hidden="false"><div class="iiif-metadata-component"><div class="groups"><div class="group"> <div class="header">About the item</div> <div class="items"><div class="item _identifier"> <div class="label">Identifier</div> <div class="values"><div class="value">EAP054/1/3</div></div> </div><div class="item _title"> <div class="label">Title</div> <div class="values"><div class="value">Jacques Touselle Photographs: box 3 [c 1982]</div></div> </div><div class="item _place"> <div class="label">Place</div> <div class="values"><div class="value">Cameroon, Africa</div></div> </div><div class="item _link-to-catalogue-record"> <div class="label">Link to catalogue record</div> <div class="values"><div class="value"><a href="http://eap-dev.cogapp.com/archive-file/EAP054-1-3" target="_blank">View the catalogue record</a></div></div> </div><div class="item _citation"> <div class="label">Citation</div> <div class="values"><div class="value">Jacques Touselle Photographs: box 3 [c 1982], British Library, EAP054/1/3, http://eap-dev.cogapp.com/archive-file/EAP054-1-3</div></div> </div><div class="item _digitised-by"> <div class="label">Digitised by</div> <div class="values"><div class="value">University of Kent</div></div> </div><div class="item _digitisation-funded-by"> <div class="label">Digitisation funded by</div> <div class="values"><div class="value">Endangered Archives Programme supported by Arcadia</div></div> </div><div class="item _language"> <div class="label">Language</div> <div class="values"></div> </div><div class="item _scripts"> <div class="label">Scripts</div> <div class="values"></div> </div><div class="item _description"> <div class="label">Description</div> <div class="values"><div class="value">Written on the outside of the box is the following: "11/02/1982". Format of original: Mix of plastic negatives, 120 format plus 2 large plates.… <a href="#" class="toggle less">more</a></div></div> </div><div class="item _attribution"> <div class="label">Attribution</div> <div class="values"><div class="value">Except as otherwise permitted under your national copyright law this material may not be copied or distributed further</div></div> </div><div class="item _logo"> <div class="label">Logo</div> <div class="values"><div class="value"><img alt="logo" src="https://eap.bl.uk/themes/custom/eap/images/bl_logo_100.gif"></div></div> </div></div> </div></div><div class="noData" style="display: none;">No data to display</div></div></div></div>
@demiankatz demiankatz moved this to To be assessed in Universal Viewer Community Board Aug 12, 2024
@scoutb-cogapp scoutb-cogapp changed the title Accessibility bug: keyboard users potentially stopped from accessing sidebar Accessibility issue: keyboard users potentially stopped from accessing sidebar Aug 13, 2024
@jamesmisson jamesmisson self-assigned this Oct 16, 2024
@Saira-A Saira-A assigned Saira-A and unassigned jamesmisson and Saira-A Oct 22, 2024
@LlGC-jop
Copy link
Contributor

I found I was able to focus on the sidebar's .main div after removing links and from there use arrows to scroll.

Has anyone else tried and found they can't?

@Saira-A
Copy link
Contributor

Saira-A commented Oct 23, 2024

I edited the manifest to completely remove the links (https://gist.githubusercontent.com/Saira-A/41d645a926e28888ec22c87fbf03214e/raw/a8cc631c3fc9386c971ed57dcbf5444edda4b509/gistfile1.json) and from there it doesn't let me scroll at all using the arrow keys - the tabbing goes straight from the panel open/collapse button to the footer options

@LlGC-jop
Copy link
Contributor

Is that with the panel open or closed @Saira-A?

With it closed I get the panel arrows highlighted and then tab takes me to the footer, but that's what I'd expect with the panel closed.

If I open the panel, either before tabbing, or as part of the sequence, I get the main div focused and I can scroll.

@Saira-A
Copy link
Contributor

Saira-A commented Oct 23, 2024

It's for both - whether it's open or closed it goes straight from the panel arrows to the footer icons. That's with Chrome, I just tried it on Safari and it completely skips the footer icons as well (though not the bottom search bar if it has one)

@LlGC-jop
Copy link
Contributor

Weird. I guess we could just stick tabindex=0 on the main div. Something like

this.$main.attr('tabindex', 0);

on line 38 of MoreInfoRightPanel.ts should do it I think.

I'll take a look at that tomorrow.

@LlGC-jop LlGC-jop self-assigned this Oct 23, 2024
demiankatz pushed a commit that referenced this issue Oct 31, 2024
* Adds a tabindex to the right info panel's main element so it can be focused regardless of whether it has focus-able content

* check for scrolling before setting/unsetting tabindex and aria label. make elements articles so they'll be readable by screenreaders.
@github-project-automation github-project-automation bot moved this from Community Sprint IN TESTING to Completed in Universal Viewer Community Board Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

6 participants