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

Make the controls tabbable #1857

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Make the controls tabbable #1857

merged 5 commits into from
Dec 18, 2024

Conversation

sndrs
Copy link
Member

@sndrs sndrs commented Dec 17, 2024

What are you changing?

  • makes the controls tabbable, breaking them into two groups of menuitems inside a menu: clue menuitems and grid menuitems
  • and keys move you between menuitems of a group
  • and keys move you between groups
  • moving between groups re-selects the previously selected menuitem
  • tabbing out of and back into menu re-selects the previously selected menuitem
  • clue menuitems (buttons) are disabled when there's no clue selected, rather than not rendered

It includes some refactors i found made it easier to reason about what i was trying to do:

  • control buttons are now all individual components that are composed in the main Controls component
  • ButtonCrosswordButton
  • Button#onSuccessCrosswordButton#onClick
image

Why?

  • so that controls can be accessed from the keyboard/by a screen reader

@sndrs sndrs added this to the Decommission Frontend Rendering milestone Dec 17, 2024
Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: 400d4be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label Dec 17, 2024
@sndrs sndrs marked this pull request as ready for review December 17, 2024 13:39
@sndrs sndrs requested a review from a team as a code owner December 17, 2024 13:39
@sndrs sndrs added the run_chromatic Runs chromatic when label is applied label Dec 17, 2024
@sndrs sndrs linked an issue Dec 17, 2024 that may be closed by this pull request
@sndrs sndrs self-assigned this Dec 17, 2024
@sndrs sndrs enabled auto-merge December 17, 2024 13:45
@sndrs sndrs disabled auto-merge December 17, 2024 14:05
@sndrs sndrs merged commit d70174d into main Dec 18, 2024
21 checks passed
@sndrs sndrs deleted the sndrs/xwd/a11y/controls branch December 18, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 npm Affects a @guardian package on NPM run_chromatic Runs chromatic when label is applied
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Make crossword controls tabbable
2 participants