Skip to content

Graduate button loading disabled styles - #8758

Draft
francinelucca wants to merge 2 commits into
mainfrom
francinelucca-graduate-button-loading-styles
Draft

francinelucca wants to merge 2 commits into
mainfrom
francinelucca-graduate-button-loading-styles

Conversation

@francinelucca

Copy link
Copy Markdown
Member

Closes #7879

Graduate primer_react_button_loading_disabled_styles: loading buttons now use disabled styling by default while retaining their existing aria-disabled semantics, focusability, and loading announcements. This preserves the primary variant without requiring native disabled or inactive.

Changelog

New

  • Regression coverage for disabled loading styles across all five button variants and restoring enabled styles when loading finishes.

Changed

  • Apply the existing disabled loading styles without a feature flag.
  • Document the default loading appearance and include an @primer/react patch changeset.

Removed

  • primer_react_button_loading_disabled_styles registration, hook usage, and temporary styling attribute.

Rollout strategy

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

Ship the previously flagged styling as the default in the next patch release. No consumer API migration is required.

Testing & Reviewing

  • npm run build — passed.
  • npm test -- --run --project '@primer/react' packages/react/src/Button/__tests__/Button.test.tsx — passed, 63 tests.
  • npm test -- --run — passed, 3,094 tests; 3 skipped and 10 todo.
  • npm run type-check — passed.
  • npm run lint and npm run lint:css — passed.
  • npm run format, npm run lint:fix, and npm run format:diff — passed.
  • STORYBOOK_URL=http://localhost:6008 npx playwright test e2e/components/Axe.test.ts --grep 'components-(button|iconbutton|linkbutton)-features--loading( |-|$)' --workers=2 — passed, 108 accessibility checks across nine themes. Used the running Storybook index for accessibility test discovery.
  • STORYBOOK_URL=http://localhost:6008 npx playwright test e2e/components/Button.test.ts --grep 'Loading.*@vrt' --workers=2 — could not compare: all 36 checks lack macOS baselines. Generated macOS snapshots were removed; canonical Linux baselines should be regenerated with the update snapshots label.

Visually inspected the existing Loading story: loading primary buttons retain the primary disabled appearance and remain focusable without native disabled.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 98f955c

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

@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Nov 14, 2026
@github-actions github-actions Bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

This branch was successfully deployed

2 active deployments
storybook-preview-8758 — 98f955c0 Deployed Nov 14, 2026 by github-actions[bot]
github-pages — 98f955c0 Deployed Nov 14, 2026 by primer[bot] via deploy-preview #34308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rendering an accessible disabled loading primary button is impossible

1 participant