Skip to content

[UEPR-487] Make the Sound Editor fully navigable via keyboard#445

Merged
adzhindzhi merged 4 commits intoscratchfoundation:release/UEPR-297-accessibility-improvementsfrom
kbangelov:task/uepr-487-make-sound-editor-navigable-via-keyboard
Feb 17, 2026
Merged

[UEPR-487] Make the Sound Editor fully navigable via keyboard#445
adzhindzhi merged 4 commits intoscratchfoundation:release/UEPR-297-accessibility-improvementsfrom
kbangelov:task/uepr-487-make-sound-editor-navigable-via-keyboard

Conversation

@kbangelov
Copy link
Copy Markdown
Contributor

Resolves

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

Proposed Changes

Improved accessibility

  • Disabled some buttons, preventing them from being focused when disabled.
  • Improved outline of play button.
  • Removed unnecessary tabIndex=1 logic.
  • Added aria-labels instead of title in buttons because it will be picked up by more screen-readers.
  • Updated tests and snapshots to adjust to new attributes.

Reason for Changes

Part of accessibility initiative for Scratch.

Test Coverage

Tests were already written for the Editor.

@kbangelov kbangelov requested a review from a team as a code owner February 13, 2026 08:47
@kbangelov kbangelov force-pushed the task/uepr-487-make-sound-editor-navigable-via-keyboard branch from 8e56af1 to 9262f0d Compare February 13, 2026 09:01
@kbangelov kbangelov force-pushed the task/uepr-487-make-sound-editor-navigable-via-keyboard branch from 9262f0d to 1cec70a Compare February 13, 2026 09:15
@kbangelov kbangelov changed the base branch from develop to release/UEPR-297-accessibility-improvements February 13, 2026 10:10
Copy link
Copy Markdown
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.

I left one small comment, but otherwise it looks good!

Comment thread packages/scratch-gui/src/components/sound-editor/sound-editor.jsx
Copy link
Copy Markdown
Contributor

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

This PR enhances keyboard accessibility for the Sound Editor by implementing proper ARIA attributes, focus management, and button state handling. The changes align with WCAG accessibility guidelines and improve the experience for keyboard and screen reader users.

Changes:

  • Replaced HTML title attributes with aria-label for icon-only buttons (Play, Stop, Undo, Redo) to improve screen reader support
  • Removed custom tabIndex="1" to maintain natural tab order for keyboard navigation
  • Added native disabled attribute to IconButton component for proper focus management and accessibility
  • Removed outline: none from play/stop buttons to enable visible focus indicators
  • Fixed typo: stopButtonnstopButton

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/scratch-gui/src/components/sound-editor/sound-editor.jsx Replaced title with aria-label for Play/Stop/Undo/Redo buttons; removed tabIndex="1"; fixed CSS class typo
packages/scratch-gui/src/components/sound-editor/sound-editor.css Removed outline: none from .round-button to allow focus indicators
packages/scratch-gui/src/components/icon-button/icon-button.jsx Added native disabled attribute to button element for proper accessibility
packages/scratch-gui/test/unit/containers/sound-editor.test.jsx Updated test selectors from getByTitle to getByRole with accessible name
packages/scratch-gui/test/unit/components/sound-editor.test.jsx Updated test selectors from title attribute to aria-label attribute
packages/scratch-gui/test/integration/sounds.test.js Updated XPath selector from title to aria-label
packages/scratch-gui/test/unit/containers/snapshots/sound-editor.test.jsx.snap Updated snapshot to reflect aria-label instead of title, removed tabindex, added disabled
packages/scratch-gui/test/unit/components/snapshots/sound-editor.test.jsx.snap Updated snapshot to reflect aria-label instead of title, removed tabindex

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

Comment thread packages/scratch-gui/test/integration/sounds.test.js Outdated
@kbangelov kbangelov force-pushed the task/uepr-487-make-sound-editor-navigable-via-keyboard branch from 17c9ed9 to a6bdd0b Compare February 17, 2026 10:05
Copy link
Copy Markdown
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 to me! 🙌

@adzhindzhi adzhindzhi merged commit 624eadf into scratchfoundation:release/UEPR-297-accessibility-improvements Feb 17, 2026
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 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.

3 participants