Skip to content

[UEPR-488] Make Sprite selector items fully navigable via keyboard#442

Merged
adzhindzhi merged 14 commits intoscratchfoundation:release/UEPR-297-accessibility-improvementsfrom
kbangelov:task/uepr-488-make-sprite-selectors-navigable-via-keyboard
Feb 18, 2026
Merged

[UEPR-488] Make Sprite selector items fully navigable via keyboard#442
adzhindzhi merged 14 commits intoscratchfoundation:release/UEPR-297-accessibility-improvementsfrom
kbangelov:task/uepr-488-make-sprite-selectors-navigable-via-keyboard

Conversation

@kbangelov
Copy link
Contributor

@kbangelov kbangelov commented Feb 12, 2026

Resolves

https://scratchfoundation.atlassian.net/browse/UEPR-488

Proposed Changes

  • Makes sprite item and delete button for it respond to "Enter" like they do on click.
  • Improved semantics.
  • Added default focus on delete button prompt open.
  • Added better aria-label for sprite item that contains name and details.

Reason for Changes

Part of accessibility initiative for Scratch.

@kbangelov kbangelov requested a review from a team as a code owner February 12, 2026 11:21
@kbangelov kbangelov force-pushed the task/uepr-488-make-sprite-selectors-navigable-via-keyboard branch from d648afd to 5f120d1 Compare February 12, 2026 11:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables full keyboard navigation/activation for sprite selector items and related controls, improving accessibility semantics and focus management.

Changes:

  • Replaced sprite item wrapper with a <button> and added an aria-label including sprite metadata.
  • Added key handling for Enter/Space on sprite items and delete buttons.
  • Auto-focuses the “Yes/OK” button when the delete confirmation prompt opens.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
packages/scratch-gui/src/components/sprite-selector-item/sprite-selector-item.jsx Converts sprite item to a button, adds aria-label and keyboard handling
packages/scratch-gui/src/components/sprite-selector-item/sprite-selector-item.css Removes default button styling to preserve existing visuals
packages/scratch-gui/src/components/delete-confirmation-prompt/delete-confirmation-prompt.jsx Adds default focus to confirmation button on mount
packages/scratch-gui/src/components/delete-button/delete-button.jsx Adds keyboard handling for Enter/Space on delete control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kbangelov kbangelov changed the base branch from develop to release/UEPR-297-accessibility-improvements February 13, 2026 10:10
@kbangelov kbangelov requested a review from adzhindzhi February 16, 2026 10:14
@kbangelov kbangelov requested a review from adzhindzhi February 16, 2026 12:52
Copy link
Contributor

@adzhindzhi adzhindzhi left a comment

Choose a reason for hiding this comment

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

Left two minor comments, but otherwise looks good to me! 🙌

@kbangelov kbangelov requested a review from adzhindzhi February 18, 2026 09:22
Copy link
Contributor

@adzhindzhi adzhindzhi left a comment

Choose a reason for hiding this comment

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

Looks good! 🙌

@adzhindzhi adzhindzhi merged commit 58dbbaa into scratchfoundation:release/UEPR-297-accessibility-improvements Feb 18, 2026
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments