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-2632 add keyboard navigation and focusing #2108

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

jamieomaguire
Copy link
Contributor

@jamieomaguire jamieomaguire commented Dec 4, 2024

Describe your changes (can list changeset entries if preferable)

  • Introduces keyboard navigation inside the Radio Group component. This functionality should adhere to the behaviours outlined in this W3 guide. Image attached below showing the relevant section.
  • I have opted to mirror the Shift + Tab behaviour displayed in Chrome, whereby focusing the radio group when no option is selected will focus the last item.
  • RTL support is included. When in RTL, the left arrow key will go forwards and the right array will go backwards.
Screenshot 2024-12-12 at 15 45 56

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?

Task Link
Aperture PR 🔗
NextJS 14 deployment 🔗
Nuxt 3 deployment 🔗
Vanilla deployment 🔗
Storybook Deployment 🔗

Reviewer checklists (complete before approving)

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

Reviewer 1 - @fernandofranca

  • 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)
  • [-] N/A 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)
  • [-] N/A If there are visual test updates, I have reviewed them.

Copy link

changeset-bot bot commented Dec 4, 2024

🦋 Changeset detected

Latest commit: 9c3d4bf

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 Minor
@justeattakeaway/pie-radio-group 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 jamieomaguire added work-in-progress This pull request is still a work in progress and may not be ready for review DO NOT MERGE labels Dec 4, 2024
@jamieomaguire jamieomaguire force-pushed the dsw-2632-keyboard-nav-2 branch 2 times, most recently from f537f3e to 4e6297f Compare December 4, 2024 13:22
@jamieomaguire jamieomaguire force-pushed the dsw-2632-keyboard-nav-2 branch 5 times, most recently from fed66d1 to 4952498 Compare December 5, 2024 12:21
@jamieomaguire jamieomaguire marked this pull request as ready for review December 5, 2024 12:29
@jamieomaguire jamieomaguire requested review from a team as code owners December 5, 2024 12:29
@jamieomaguire jamieomaguire changed the title WIP feat(pie-radio-group): DSW-2632 add keyboard navigation and focusing Dec 5, 2024
@jamieomaguire jamieomaguire force-pushed the dsw-2632-keyboard-nav-2 branch 2 times, most recently from 38ebde9 to 6bd923f Compare December 11, 2024 14:48
@jamieomaguire jamieomaguire force-pushed the dsw-2632-keyboard-nav-2 branch 2 times, most recently from e6aecfb to 1e81ef7 Compare December 12, 2024 15:21
@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

Copy link
Contributor

@fernandofranca fernandofranca left a comment

Choose a reason for hiding this comment

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

Awesome stuff!!!

@jamieomaguire jamieomaguire merged commit c926464 into main Dec 16, 2024
34 of 35 checks passed
@jamieomaguire jamieomaguire deleted the dsw-2632-keyboard-nav-2 branch December 16, 2024 12:36
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.

5 participants