Advertise the layout-first placed video's keyboard remove shortcut#1341
Open
galuis116 wants to merge 1 commit into
Open
Advertise the layout-first placed video's keyboard remove shortcut#1341galuis116 wants to merge 1 commit into
galuis116 wants to merge 1 commit into
Conversation
The placed video's keydown handler removes it on Delete/Backspace (the same as the Remove button), but its aria-keyshortcuts listed only the move/swap arrow keys, so a screen-reader user never heard that Delete removes the focused video. The layout picker buttons already follow the rule that advertised keys must match every key the handler acts on; this holds the placed video to it too: aria-keyshortcuts now names Delete and Backspace, and the accessible name mentions Delete removes the video. Behaviour is unchanged for sighted/mouse users; this only makes the existing keyboard remove path discoverable to assistive tech.
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.
What this fixes
The layout-first placed video can already be removed with the keyboard — its keydown handler clears the video on
Delete/Backspace, the same as the Remove button. But the container'saria-keyshortcutsadvertised only the move/swap arrow keys (ArrowLeft ArrowRight ArrowUp ArrowDown), so a screen-reader user was never told thatDeleteremoves the focused video. The keyboard remove path existed but was undiscoverable to assistive tech.This is the same rule the layout picker buttons already follow (their
aria-keyshortcutslists every key their handler acts on, includingHome/End). The placed video was the one control breaking it.Change
preview/layout-first.js:aria-keyshortcutson the placed video now namesDeleteandBackspace(the keys the handler honours), and the accessible name mentions thatDeleteremoves the video. No behaviour change for sighted/mouse users — the remove path is identical; it's just now announced.preview/layout-first-remove-shortcut.test.js: new behavioural test asserting the move/swap arrows stay advertised, the remove keys are advertised, the name mentions Delete, and the advertisedDeleteshortcut actually removes the focused video.Verification
Suggested label: bugfix (advertised keyboard shortcuts didn't match the handler's actual keys, hiding a working control from screen-reader users).