Skip to content

Advertise the layout-first placed video's keyboard remove shortcut#1341

Open
galuis116 wants to merge 1 commit into
e35dev:mainfrom
galuis116:layout-first-remove-shortcut
Open

Advertise the layout-first placed video's keyboard remove shortcut#1341
galuis116 wants to merge 1 commit into
e35dev:mainfrom
galuis116:layout-first-remove-shortcut

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

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's aria-keyshortcuts advertised only the move/swap arrow keys (ArrowLeft ArrowRight ArrowUp ArrowDown), so a screen-reader user was never told that Delete removes 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-keyshortcuts lists every key their handler acts on, including Home/End). The placed video was the one control breaking it.

Change

  • preview/layout-first.js: aria-keyshortcuts on the placed video now names Delete and Backspace (the keys the handler honours), and the accessible name mentions that Delete removes 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 advertised Delete shortcut actually removes the focused video.

Verification

node preview/layout-first-remove-shortcut.test.js   # new test passes
node preview/layout-first.test.js                   # existing suite green
node preview/layout-first-remove-announce.test.js   # green
node preview/layout-first-move-swap.test.js         # green

Suggested label: bugfix (advertised keyboard shortcuts didn't match the handler's actual keys, hiding a working control from screen-reader users).

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant