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

SubNav v2 a11y fixes #854

Merged
merged 3 commits into from
Dec 10, 2024
Merged

SubNav v2 a11y fixes #854

merged 3 commits into from
Dec 10, 2024

Conversation

rezrah
Copy link
Collaborator

@rezrah rezrah commented Dec 9, 2024

Summary

Follow up to #851

Fixes additional issues found during upgrade, but non-blocking for the latest dotcom upgrade release.

List of notable changes:

  • Removed focus-trapping in the menu overlay on narrow viewports
  • Added hover state to the SubNav.Heading
  • Added aria-current visual indicator parity on narrow viewports in mobile overlay
  • Separator now shows by default even if aria-current isn't set, but hidden on mobile

What should reviewers focus on?

  • Verify fixes work as expected and are not introducing any other regressions

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Removed focus trapping:

Before After
Screen.Recording.2024-12-09.at.15.45.54.mov
Screen.Recording.2024-12-09.at.15.46.21.mov

Separator by default:

Before After

image

image

Copy link

changeset-bot bot commented Dec 9, 2024

🦋 Changeset detected

Latest commit: d1c1579

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@primer/react-brand Patch
@primer/brand-primitives Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 9, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Dec 9, 2024

⚠️ Visual differences found

Our visual comparison tests found UI differences.

Please review the differences by using the test artifacts to ensure that the changes were intentional.

Artifacts can be downloaded and reviewed locally.

Download links are available at the bottom of the workflow summary screen.

Example:

artifacts section of workflow run

If the changes are expected, please run npm run test:visual:update-snapshots to replace the previous fixtures.

Review visual differences

Copy link
Contributor

@stamat stamat left a comment

Choose a reason for hiding this comment

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

Just tested it! Looking 👌 perfect! Removing the focus trap solves the issue of accessing the close button and closing the subnav on focus out. We can reintroduce the focus trap once we take a deeper look into the focus trap we import from gh behaviors or primer... I forgot...

Copy link
Contributor

@danielguillan danielguillan left a comment

Choose a reason for hiding this comment

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

Works great!

@rezrah rezrah merged commit fa277af into main Dec 10, 2024
16 of 18 checks passed
@rezrah rezrah deleted the rezrah/subnav-v2-post-release-fixes branch December 10, 2024 11:33
@primer-css primer-css mentioned this pull request Dec 10, 2024
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.

3 participants