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

feat(pie-radio-group): DSW-2634 make screenreaders narrate index and selected #2133

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

Conversation

jamieomaguire
Copy link
Contributor

@jamieomaguire jamieomaguire commented Jan 3, 2025

Describe your changes (can list changeset entries if preferable)

  • Updates the Radio and Radio Group components to ensure screenreaders correctly announce the index and selection size of inputs in a group. For example "2 of 6".
  • Updates Radio to apply an aria-checked attribute to itself that reflects the checked state, so that screenreaders will say "selected" or similar when the radio is selected.
  • New tests to check the features above

Author Checklist (complete before requesting a review, do not delete any)

  • I have performed a self-review of my code.
  • I have added thorough tests where applicable (unit / component / visual).
  • I have reviewed the PIE Storybook/PIE Docs PR preview.
  • If changes will affect consumers of the package, I have created a changeset entry.
  • If a changeset file has been created, I have tested these changes in PIE Aperture using the /test-aperture command.

Not-applicable Checklist items

Please move any Author checklist items that do not apply to this pull request here.

  • I have reviewed visual test updates properly before approving.

Testing

How do I test my changes?

  • Please visit each Aperture Radio Group page below and, with screen readers enabled, navigate through the radio buttons using your keyboard. The screenreader should correctly identify which position your selected radio button is in the group. For example "2 of 4" and it should say it is selected.
Task Link
Aperture PR 🔗
NextJS 14 deployment 🔗
Nuxt 3 deployment 🔗
Vanilla deployment 🔗

Reviewer checklists (complete before approving)

Mark items as [-] N/A if not applicable.

Reviewer 1

  • I have reviewed the PIE Storybook/PIE Docs PR preview.
  • I have verified that all acceptance criteria for this ticket have been completed.
  • I have reviewed the Aperture changes (if added)
  • If there are visual test updates, I have reviewed them.

Reviewer 2

  • I have reviewed the PIE Storybook/PIE Docs PR preview.
  • I have verified that all acceptance criteria for this ticket have been completed.
  • I have reviewed the Aperture changes (if added)
  • If there are visual test updates, I have reviewed them.

Copy link

changeset-bot bot commented Jan 3, 2025

🦋 Changeset detected

Latest commit: 8f4901f

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

This PR includes changesets to release 9 packages
Name Type
@justeattakeaway/pie-radio-group Minor
@justeattakeaway/pie-radio Minor
pie-storybook Patch
@justeattakeaway/pie-webc Patch
wc-angular12 Patch
wc-nuxt2 Patch
wc-react17 Patch
wc-react18 Patch
wc-vue3 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

@jamieomaguire
Copy link
Contributor Author

/test-aperture

@pie-design-system-bot
Copy link
Contributor

Starting a new snapshot build. You can view the logs here.

@pie-design-system-bot
Copy link
Contributor

@jamieomaguire Your snapshots have been published to npm!

Test the snapshots by updating your package.json with the newly-published versions:

Note

If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts.

yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile

Then finally:

yarn install

@jamieomaguire
Copy link
Contributor Author

/snapit

@pie-design-system-bot
Copy link
Contributor

Starting a new snapshot build. You can view the logs here.

@pie-design-system-bot
Copy link
Contributor

@jamieomaguire Your snapshots have been published to npm!

Test the snapshots by updating your package.json with the newly-published versions:

Note

If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts.

yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile

Then finally:

yarn install

@jamieomaguire jamieomaguire force-pushed the dsw-2634-screenreader-groups branch from 3d95eb4 to 0d31337 Compare January 10, 2025 10:49
@github-actions github-actions bot temporarily deployed to storybook-pr-2133 January 10, 2025 10:54 Inactive
@github-actions github-actions bot temporarily deployed to storybook-testing-pr-2133 January 10, 2025 10:54 Inactive
@jamieomaguire
Copy link
Contributor Author

/snapit

@pie-design-system-bot
Copy link
Contributor

Starting a new snapshot build. You can view the logs here.

@pie-design-system-bot
Copy link
Contributor

@jamieomaguire Your snapshots have been published to npm!

Test the snapshots by updating your package.json with the newly-published versions:

Note

If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts.

yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile
yarn up @justeattakeaway/[email protected] --mode=update-lockfile

Then finally:

yarn install

@pie-design-system-bot
Copy link
Contributor

pie-design-system-bot commented Jan 10, 2025




Fails
🚫 You have unchecked checklist items outside the "Not-applicable Checklist items" section.

Please ensure all unchecked checkboxes are moved to the appropriate section.

🚫 You have unchecked checklist items in Reviewer 1's section.

Please ensure all items are addressed before approval.

🚫 You have unchecked checklist items in Reviewer 2's section.

Please ensure all items are addressed before approval.

Generated by 🚫 dangerJS against bf226ba

@jamieomaguire jamieomaguire changed the title Dsw 2634 screenreader groups feat(pie-radio-group): DSW-2634 ensure screenreaders narrate index and selected Jan 10, 2025
@jamieomaguire jamieomaguire changed the title feat(pie-radio-group): DSW-2634 ensure screenreaders narrate index and selected feat(pie-radio-group): DSW-2634 make screenreaders narrate index and selected Jan 10, 2025
@github-actions github-actions bot temporarily deployed to storybook-pr-2133 January 10, 2025 11:47 Inactive
@github-actions github-actions bot temporarily deployed to storybook-testing-pr-2133 January 10, 2025 11:47 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants