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

Exclude Subnav links with aria-current set to "false" from active link styling #585

Merged
merged 4 commits into from
May 12, 2024

Conversation

MelissaPastore
Copy link
Contributor

@MelissaPastore MelissaPastore commented May 1, 2024

Summary

List of notable changes:

Changes to SubNav styling:

  • packages/react/src/SubNav/SubNav.module.css: Updated the CSS selectors for .SubNav__links-overlay--open .SubNav__link[aria-current], .SubNav__link:hover *, .SubNav__link[aria-current] and .SubNav__link[aria-current] .SubNav__link-label::after to exclude SubNav links with aria-current set to "false" from active link styling. [1] [2] [3]

Changes to SubNav stories:

Package version update:

What should reviewers focus on?

  • Is there anything else I missed?

Steps to test:

  1. Go to the Subnav component in Storybook.
  2. Ensure the example with aria-current="false" no longer has active link styling applied.

Supporting resources (related issues, external links, etc):

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
  • New visual snapshots have been generated / updated for any UI changes
  • 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:


Before After
Screenshot 2024-05-03 at 10 20 42 AM Screenshot 2024-05-03 at 10 19 30 AM

Copy link

changeset-bot bot commented May 1, 2024

🦋 Changeset detected

Latest commit: 9407fd3

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 May 1, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented May 1, 2024

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@MelissaPastore MelissaPastore changed the title Exclude elements with aria-current set to "false" from active link styling Exclude Subnav links with aria-current set to "false" from active link styling May 1, 2024
@MelissaPastore MelissaPastore marked this pull request as ready for review May 7, 2024 14:02
@MelissaPastore MelissaPastore requested a review from rezrah May 7, 2024 14:29
Copy link
Collaborator

@rezrah rezrah left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @MelissaPastore 🙌

Changes look good to me 👍

@rezrah rezrah merged commit a033995 into main May 12, 2024
18 checks passed
@rezrah rezrah deleted the melissapastore/subnav-fix branch May 12, 2024 14:32
@primer-css primer-css mentioned this pull request May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants