Keyboard accessibility for the MelodySandbox field.#10591
Merged
riknoll merged 3 commits intomicrosoft:masterfrom May 23, 2025
Merged
Conversation
* Key navigation * Focus behaviour * Refactored common behaviour between MelodySandbox and LED Matrix to extend from abstract class * Align gallery behaviour with Sound Effect editor
riknoll
requested changes
May 22, 2025
Contributor
Author
|
Hi @riknoll, thanks for the feedback! I've made the changes you suggested. |
riknoll
approved these changes
May 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demo link https://melodysandbox-keyboard-acces.review-pxt.pages.dev/
This makes the MelodySandbox and gallery easily navigable with the keyboard, including
Architecturally, it now shares common code with the LED matrix field, to facilitate consistent changes across accessible matrix elements.
Screen.Recording.2025-05-06.at.16.01.16.mov
Melody Editor interaction changes
The melody editor is a single tab stop, navigating with the arrow keys following the WAI-ARIA grid pattern. Up and down arrow keys immediately change the pitch of a note if it is enabled, space enables or disables the note on a given column. We tried several approaches and sought feedback from our accessibility advisor, and this was the most intuitive and playful.
Gallery interaction changes
The gallery is also in a grid pattern, and behaves similarly. It is a single tab stop with arrow navigation for selecting or previewing a note, and space to select.
Both the editor and gallery screens make use of a keyboard focus trap to ensure tabbing behaviour is consistent while using the component.
Common matrix refactor
There is now an abstract
field_matrixfrom whichfield_ledmatrixandfield_melodySandboxinherit to extend their own matrix interfaces. Many of the accessibility changes were being duplicated across both elements, such that sharing the common concerns made sense.