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

Website tabs - Set focus on tab change #2561

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dchyun
Copy link
Contributor

@dchyun dchyun commented Nov 15, 2024

πŸ“Œ Summary

If merged, this PR will update the website tabs to maintain focus on the selected tab on tab change.

πŸ› οΈ Detailed description

Originally raised during the recent PR to make the website tabs sticky. It was raised that the focus should remain on the tab clicked after tab change. Tab click changes the ember route, and the current standard A11y pattern followed for route changes is to reset the user's focus and announce the changes leveraging the ember-a11y-refocus library.

It was determined that for tab changes that even though they trigger a route changes, the preferred interaction would be to have the user's focus remain on the selected tab. This was accomplished by updating the @routeChangeValidator argument of the NavigationNarrator.

Note: The presence of tabs on a page is determined by checking if the .doc-page-tabs HTML element is present.

πŸ”— External links

Jira ticket: HDS-4150


πŸ’¬ Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Nov 19, 2024 7:08pm
hds-website βœ… Ready (Inspect) Visit Preview Nov 19, 2024 7:08pm

MelSumner
MelSumner previously approved these changes Nov 19, 2024
Copy link
Contributor

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!!

@dchyun dchyun marked this pull request as ready for review November 19, 2024 15:12
@dchyun dchyun requested a review from a team as a code owner November 19, 2024 15:12
website/app/routes/show.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants