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

Consider excluding Tabs scroll buttons from keyboard navigation #432

Closed
damyanpetev opened this issue Jul 12, 2022 · 0 comments · Fixed by #435
Closed

Consider excluding Tabs scroll buttons from keyboard navigation #432

damyanpetev opened this issue Jul 12, 2022 · 0 comments · Fixed by #435
Assignees
Labels
a11y When the issue or PR is related to accessibility enhancement New feature or request feature tab ✅ status: resolved

Comments

@damyanpetev
Copy link
Member

damyanpetev commented Jul 12, 2022

The scroll buttons in the Tabs currently use Icon Buttons which are normally focusable. Those are also disabled when there's no more items to show in the respective direction. This creates some likely undesired behaviors:

  • When navigating the normal tab sequence the buttons before or after the tab list (or both) can be present - that creates inconsistent structure as buttons pop in and out of the sequence, besides just adding extra steps to jump between the tab and the panel content for example.
  • More critically, I think, if you do focus a button and start toggling it to scroll, eventually it'll disable and loose focus which I think is not great for UX or accessibility. We could focus the last tab automatically when you reach the end, but that also has activation implications depending on the config. Not to mention the button doesn't have an accessible name or any way to indicate the progress state as you scroll along.

For the most part, I'm of the opinion that scroll buttons don't add anything to keyboard navigation as you can already navigate between the tabs with arrows and Home/End. If anything they pollute the tab sequence and my suggestion is to make those non-focusable visual-only elements. Either exclude them w/ tabindex & aria-hidden or forgo the icon button entirely and go for a simple icon instead.

PS: Some interesting read here https://css-tricks.com/making-disabled-buttons-more-inclusive/

@damyanpetev damyanpetev added a11y When the issue or PR is related to accessibility enhancement New feature or request 🆕 status: new The issue is new and will be reviewed when somebody picks it up. feature tab labels Jul 12, 2022
@rkaraivanov rkaraivanov added ✅ status: resolved and removed 🆕 status: new The issue is new and will be reviewed when somebody picks it up. labels Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y When the issue or PR is related to accessibility enhancement New feature or request feature tab ✅ status: resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants