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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

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: f02fd75

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.

@kendallgassner
Copy link
Contributor Author

kendallgassner commented Jan 21, 2025

@TylerJDev what do you think should this be minor changeset? Since the props now enforce developers add aria-labels?

@TylerJDev
Copy link
Contributor

@kendallgassner, let's see how it runs in Dotcom's CI! I'll run an integration test PR for us. I feel like minor is the right call, but we'll see if it's a breaking change or not in the test PR 🤔

@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/358710

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jan 21, 2025
@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@kendallgassner
Copy link
Contributor Author

kendallgassner commented Jan 21, 2025

3 ish changes needed for 🔴 golden-jobs to pass. I will make a PR in dotcom.

@hectahertz
Copy link
Contributor

@TylerJDev what do you think should this be minor changeset? Since the props now enforce developers add aria-labels?

If we are making the prop required it should be a breaking change; even if it's not breaking dotcom, it might be breaking for other users of Primer React.

@kendallgassner
Copy link
Contributor Author

Now switching this to a 'console.warn' so I think we can move back to patch.

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"

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