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

Convey Spinner to assistive technologies #4140

Merged
merged 16 commits into from
Jun 17, 2024
Merged

Convey Spinner to assistive technologies #4140

merged 16 commits into from
Jun 17, 2024

Conversation

mperrotti
Copy link
Contributor

@mperrotti mperrotti commented Jan 10, 2024

Closes #3942

Changelog

New

  • Spinner accepts srText prop (default value is "Loading"

Changed

  • Deprecated aria-label on Spinner
  • Restricts Spinner to only accept specified props, not just any HTML attribute

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

When we ship the next major release, we can remove aria-label from Spinner and provide a codemod to change it to srText.

Testing & Reviewing

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Storybook)
  • [unsure] Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge
  • (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)

@mperrotti mperrotti requested review from a team and pksjce January 10, 2024 20:48
Copy link

changeset-bot bot commented Jan 10, 2024

🦋 Changeset detected

Latest commit: 7c736b8

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 Minor

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

@mperrotti mperrotti marked this pull request as draft January 10, 2024 20:49
Copy link
Contributor

github-actions bot commented Jan 10, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.72 KB (+0.1% 🔺)
packages/react/dist/browser.umd.js 89.92 KB (+0.03% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-4140 January 10, 2024 23:04 Inactive
@mperrotti mperrotti marked this pull request as ready for review January 10, 2024 23:20
/>
</svg>
/* inline-flex removes the extra line height */
<Box sx={{display: 'inline-flex'}} role={hasSrAnnouncement ? 'status' : undefined}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we want to add the role value as a prop instead of a static value? If so, we would only have two values to pick from, status and alert, with status being the default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can definitely do that. Great idea.

@mperrotti
Copy link
Contributor Author

I'm converting this back to a draft until we decide on a direction based on feedback in this discussion: https://github.com/github/primer/discussions/2976

@mperrotti mperrotti marked this pull request as draft January 16, 2024 16:04
@mperrotti
Copy link
Contributor Author

The aria-live issues should be resolved by #4174

@TylerJDev
Copy link
Contributor

Hey @mperrotti 👋! With live-region-element being available, do you think this PR is good to go?

@lindseywild
Copy link
Contributor

@mperrotti Hi! Just wanted to check in on the status of this PR 🙏🏻

@mperrotti
Copy link
Contributor Author

Sorry @lindseywild - this PR got lost and stale. Going to update today.

Related PVC PR: primer/view_components#2884

@mperrotti
Copy link
Contributor Author

@TylerJDev - after talking to @joshblack, I decided to remove the announcement until we land on a solution for using Status in components without accidentally triggering too many announcements.

@mperrotti mperrotti added this pull request to the merge queue Jun 17, 2024
Merged via the queue into main with commit c093411 Jun 17, 2024
30 checks passed
@mperrotti mperrotti deleted the mp/spinner-a11y branch June 17, 2024 19:11
@primer primer bot mentioned this pull request Jun 17, 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.

Spinner is inaccessible by default
3 participants