Skip to content

UnderlineNav: respect prefers-reduced-motion for the loading counter - #8656

Merged
adierkens merged 1 commit into
primer:mainfrom
RafaelHDSV:RafaelHDSV/underline-nav-reduced-motion
Nov 17, 2026
Merged

adierkens merged 1 commit into
primer:mainfrom
RafaelHDSV:RafaelHDSV/underline-nav-reduced-motion

Conversation

@RafaelHDSV

Copy link
Copy Markdown
Contributor

Closes #8651

The loading-counter pulse on UnderlineNav / TabNav ran for as long as the count was fetching, with no prefers-reduced-motion guard. The same “something is coming” treatment on SkeletonBox, ProgressBar, and SegmentedControl already opts in to motion.

The counter still renders as a solid grey pill. The 1.2s opacity animation only runs when the visitor has not asked for reduced motion.

Changelog

New

n/a

Changed

  • LoadingCounter (UnderlineNav / TabNav): wrap the pulse animation in @media (prefers-reduced-motion: no-preference)

Removed

n/a

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

Testing & Reviewing

  1. Open an UnderlineNav story with loadingCounters (or TabNav in a loading-count state).
  2. DevTools → Rendering → Emulate CSS media feature prefers-reduced-motion: reduce.
  3. The grey pill should stay at full opacity; computed animation-name should be none.
  4. Switch the emulation to no-preference: the pulse should still run (loadingCounterKeyFrames).

Visual snapshots should be unchanged: the reduced-motion end state is the same fully opaque pill the animation starts from.

@changeset-bot

changeset-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: edc15c8

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@siddharthkp
siddharthkp requested review from siddharthkp and removed request for TylerJDev November 2, 2026 21:02
@adierkens adierkens added the integration-tests: skipped manually Changes in this PR do not require an integration test label Nov 17, 2026
@adierkens

Copy link
Copy Markdown
Contributor

.skip-integration-checks

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Cannot proceed with operation

  • reviewDecision: REVIEW_REQUIRED

All operations from forks must have the required reviews before they can proceed. Please ensure this PR has been reviewed and approved before trying again.

@adierkens

Copy link
Copy Markdown
Contributor

.skip-integration-checks

@adierkens
adierkens added this pull request to the merge queue Nov 17, 2026
@adierkens

Copy link
Copy Markdown
Contributor

Thanks for the contribution @RafaelHDSV

Merged via the queue into primer:main with commit 78abbdf Nov 17, 2026
57 of 58 checks passed
@primer primer Bot mentioned this pull request Nov 17, 2026

This branch was successfully deployed

1 active deployment
github-pages — edc15c85 Deployed Oct 31, 2026 by RafaelHDSV via deploy-preview #30293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnderlineNav: loading counter pulses regardless of prefers-reduced-motion

2 participants