WordPress / playground-tools

GNU General Public License v2.0
127 stars 38 forks source link

Playground Block: A11y: Add text documentation for keyboard exit of CodeMirror #316

Open joedolson opened 1 week ago

joedolson commented 1 week ago

The esc + tab key combination for exiting the CodeMirror editor in the Playground block is supported, but not made evident to users. Having a visible text explanation would significantly improve the accessibility of the code view for keyboard users.

Screen reader users have other ways of exiting the block, but keyboard users have limited options.

Something to the effect of "Use esc plus tab to tab forward out of the code editor." placed before entering the editor should be sufficient.

joedolson commented 1 week ago

A slight clarification, since I realize that esc + tab technically means something different than the actual mechanism here. The process is to press esc and then press tab - pressing escape turns off the tab listener, so that the tab key will operate normally instead of being captured. It's a little bit different from the usual key combination pattern.