You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sp-tab-overflow> is an optional add-on to the Tabs component that adds a [<] and [>] button to help scroll, if there are so many tabs that they overflow off the page. These buttons are currently Keyboard-Navigable, and capture tab focus before the TabGroup itself.
These buttons should be removed from keyboard navigation for the following reasons:
Keyboard navigators can already use their arrow keys to navigate through the entire TabGroup
Every time keyboard navigation enters the TabGroup component, it will always initially focus the very first Tab, regardless of whether it is currently rendered on or off the page.
Therefore, it is superfluous to have these buttons part of the tab navigation journey.
In addition, these buttons were not labeled. This PR gives them default aria-labels and allows overrides. These default labels are "Scroll to previous tabs" and "Scroll to next tabs" - specifically avoided left/right language in case of Right-To-Left locales.
If my change required a change to the documentation, I have updated the documentation in this pull request.
I have read the CONTRIBUTING document.
I have added tests to cover my changes.
All new and existing tests passed.
I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.
Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<sp-tab-overflow>
is an optional add-on to the Tabs component that adds a [<] and [>] button to help scroll, if there are so many tabs that they overflow off the page. These buttons are currently Keyboard-Navigable, and capture tab focus before the TabGroup itself.These buttons should be removed from keyboard navigation for the following reasons:
Therefore, it is superfluous to have these buttons part of the tab navigation journey.
In addition, these buttons were not labeled. This PR gives them default
aria-label
s and allows overrides. These default labels are "Scroll to previous tabs" and "Scroll to next tabs" - specifically avoided left/right language in case of Right-To-Left locales.Related issue(s)
Motivation and context
How has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.