-
Notifications
You must be signed in to change notification settings - Fork 543
Open
Labels
Scope: Templatingrequires majora change which could not be implemented without a backwards incompatibilitya change which could not be implemented without a backwards incompatibility
Description
🐛 Current behavior
It is possible to configure a scroll to target when setting up instasearch pagination:
pagination({
...
scrollTo: '.selector',
...
})
After clicking a link in the pagination, scroll moves to reveal the indicated element.
This works great for sighted mouse users, but keyboard users will have to navigate backward through everything and as indicated in #6617, screen reader users have no idea anything happened.
🔍 Steps to reproduce
- Go to one of the demo pages like the eCommerce demo
- Use a keyboard to navigate to the pagination after the items
- Press enter to change the page
- It will scroll to the top, but if you press tab to navigate anywhere else, the screen jumps back to the bottom because focus remained at the bottom
Live reproduction
https://codesandbox.io/s/github/algolia/instantsearch/tree/templates/instantsearch.js
💭 Expected behavior
In a perfect world focus would move to the scrollTo target, BUT this may not be desired behavior so a focusOn
argument should be added and focus should move to that element if provided.
Package version
4.78.1
Operating system
No response
Browser
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
rachel-simpleclick
Metadata
Metadata
Assignees
Labels
Scope: Templatingrequires majora change which could not be implemented without a backwards incompatibilitya change which could not be implemented without a backwards incompatibility