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

[Accessibility][Storybook] Add aria-labels to the multiple item progress bar + enforce aria-label in progressbar.item #5559

Merged
merged 11 commits into from
Jan 27, 2025

Conversation

kendallgassner
Copy link
Contributor

@kendallgassner kendallgassner commented Jan 16, 2025

Closes https://github.com/github/accessibility-audits/issues/10134

In this PR I add an aria-label to each role='progressbar'. I also have updated the ProgressBar.item props to enforce that aria-labels are always added

Changelog

New

Changed

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

I am updating a storybook story.

Testing & Reviewing

Tested with a screen reader.

Merge checklist

@kendallgassner kendallgassner added the skip changeset This change does not need a changelog label Jan 16, 2025
Copy link

changeset-bot bot commented Jan 16, 2025

🦋 Changeset detected

Latest commit: a489d3a

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

Copy link
Contributor

github-actions bot commented Jan 16, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 104.49 KB (-0.05% 🔽)
packages/react/dist/browser.umd.js 104.85 KB (-0.02% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-5559 January 16, 2025 21:16 Inactive
@kendallgassner kendallgassner marked this pull request as ready for review January 21, 2025 18:01
@kendallgassner kendallgassner requested a review from a team as a code owner January 21, 2025 18:01
Copy link
Contributor

@khiga8 khiga8 left a comment

Choose a reason for hiding this comment

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

Makes sense!

  • Do you think that aria-label should be required on ProgressBar.Item?
  • I see this was an Axe violation. I thought all Primer React storybook examples have Axe checks...maybe this doesn't'? do you know why this wasn't flagged?

@kendallgassner
Copy link
Contributor Author

Do you think that aria-label should be required on ProgressBar.Item?

@khiga8 I like this, good catch.

I see this was an Axe violation. I thought all Primer React storybook examples have Axe checks...maybe this doesn't'? do you know why this wasn't flagged?

Its failing on storybook prod. 🤔 Do we not have an a CI check?

@khiga8
Copy link
Contributor

khiga8 commented Jan 21, 2025

Do you think that aria-label should be required on ProgressBar.Item?

@khiga8 I like this, good catch.

I see this was an Axe violation. I thought all Primer React storybook examples have Axe checks...maybe this doesn't'? do you know why this wasn't flagged?

Its failing on storybook prod. 🤔 Do we not have an a CI check?

There's some kind of CI axe checks running, but I'm not sure if it's running on this story...

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 21, 2025
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-5559 January 21, 2025 19:44 Inactive
@kendallgassner kendallgassner removed the skip changeset This change does not need a changelog label Jan 21, 2025
@kendallgassner
Copy link
Contributor Author

@khiga8 I'll update the testing in this PR. There are 30 failures, so I'll have to play around with it a bit.

Copy link
Contributor

@khiga8 khiga8 left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for following up and investigating if/how to require the aria-label prop! Good call pivoting to a dev-only console warning! :)

do you think this component would benefit from more comprehensive improvements (re: role="meter" vs role="progressbar") at a future time, or do you think it's at a good place now?

packages/react/src/__tests__/ProgressBar.test.tsx Outdated Show resolved Hide resolved
.changeset/orange-roses-give.md Outdated Show resolved Hide resolved
@kendallgassner
Copy link
Contributor Author

do you think this component would benefit from more comprehensive improvements (re: role="meter" vs role="progressbar") at a future time, or do you think it's at a good place now?

Yes! I think it would be beneficial to investigate splitting up this component so that when progress is not dynamically changing we use role="meter"

@TylerJDev
Copy link
Contributor

@kendallgassner do we need https://github.com/github/github/pull/358882 shipped before this PR is merged, or is it okay to merge now? I haven't updated the integration test PR, so I'm not sure if the CI is still failing or not with the new changes 🤔

@kendallgassner
Copy link
Contributor Author

@TylerJDev I changed this PR to console.warn users (only in dev mode) to add an aria-label so we can merge before https://github.com/github/github/pull/358882 is merged

@kendallgassner kendallgassner added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit 65f89fe Jan 27, 2025
42 checks passed
@kendallgassner kendallgassner deleted the kendallg/progress-bar branch January 27, 2025 16:43
@primer primer bot mentioned this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants