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

Ensure that focus remains on the button that was clicked. #2988

Open
6 tasks
h-parekh opened this issue Apr 30, 2018 · 9 comments
Open
6 tasks

Ensure that focus remains on the button that was clicked. #2988

h-parekh opened this issue Apr 30, 2018 · 9 comments
Labels
accessibility-concern Blacklight Issues that are likely to be solved in an upstream blacklight fix. priority
Milestone

Comments

@h-parekh
Copy link

Descriptive summary

Keyboard focus is lost each time a new sort button is clicked.

Rationale

WCAG guideline 3.2.2:

The intent of this Success Criterion is to ensure that entering data or selecting a form control has predictable effects

Expected behavior

Focus should remain on the button that was clicked

Actual behavior

On clicking a button using keyboard, the button loses its focus.
Affected items:

  • Sort By dropdown
  • Results per page dropdown
  • List button
  • Gallery button
  • Masonry button
  • Slideshow button

Steps to reproduce the behavior

  1. Search for something in Nurax - Example page
  2. Tab through using your keyboard to any of the buttons listed above and hit 'Return' key.
  3. Notice that the button lost focus

Related work

#1246 is similar tabbed focus issue for keyboard users, but may have a different root cause.

@h-parekh h-parekh added this to the 2.x - Accessibility milestone Apr 30, 2018
@adamjarling adamjarling self-assigned this Sep 5, 2018
@adamjarling adamjarling added the Blacklight Issues that are likely to be solved in an upstream blacklight fix. label Sep 5, 2018
@adamjarling
Copy link
Member

@no-reply @vantuyls Looks like the element <div id="sortAndPerPage" class="clearfix"> which houses these buttons is coming from Blacklight. I put the "Blacklight" label on it, and will kick this to the bottom of the current Hyrax WG Sprint Ready column.

@adamjarling adamjarling removed their assignment Sep 5, 2018
@jcoyne
Copy link
Member

jcoyne commented Sep 6, 2018

I believe this is happening because activating these buttons is causing a new page to be loaded. So the focus starts over at the top of the page. I believe I see the same problem manifest on https://demo.projectblacklight.org

@adamjarling
Copy link
Member

@jcoyne Yes, you're right the selection is causing a new page load which will make retaining focus on the element tricky. Maybe we evaluate the cost of a solution vs. the cost of keeping this as-is.

@jcoyne
Copy link
Member

jcoyne commented Sep 6, 2018

@h-parekh I wonder if the solution for you is to not use Turbolinks?

@no-reply no-reply modified the milestones: Accessibility, 3.x series Sep 23, 2019
@rjkati rjkati self-assigned this Feb 22, 2021
@rjkati
Copy link

rjkati commented Feb 22, 2021

Issue is still present in Hyrax 3.0.0.pre.rc3.

@jlhardes
Copy link
Contributor

jlhardes commented Aug 11, 2021

Need to check if this issue is a known issue in Blacklight or if it is fixed in a later version. If there is an open issue, link that issue here. If no issue or fix, create an issue for Blacklight (and we might do the work to fix and contribute back but at least it will be reported).

@rjkati rjkati removed their assignment Aug 8, 2022
@rjkati
Copy link

rjkati commented Aug 9, 2022

This issue is still present in Hyrax 4.0.0beta1.

@scherztc scherztc self-assigned this Jan 23, 2024
@scherztc
Copy link
Contributor

The issue is still present on dev.nurax.samvera.org.

Hyrax Version: 5.0.0.rc2

@scherztc scherztc removed their assignment Jan 25, 2024
@jlhardes
Copy link
Contributor

Verified this is still present in Hyrax 5.0.0 on https://dev.nurax.samvera.org/. This is also still present on http://demo.projectblacklight.org/ so this is a Blacklight issue that we need to report and share with Blacklight (and possibly contribute a fix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility-concern Blacklight Issues that are likely to be solved in an upstream blacklight fix. priority
Projects
None yet
Development

No branches or pull requests

7 participants