WordPress / better-code-editing

[✅ Merged into 4.9-alpha] Better Code Editing WordPress plugin
https://wordpress.org/plugins/better-code-editing/
37 stars 16 forks source link

Improve accessibility of CodeMirror in Custom HTML widget and theme/plugin editors #37

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

Once keyboard focus is inside of CodeMirror, it is trapped and cannot be escaped. A fix for this has been implemented for CodeMirror in the Customizer's Additional CSS (see #34) by allowing a user to hit ESC followed by Tab or Shift+Tab to move forward or behind. The same thing needs to be implemented for CodeMirror.

Alternatively, maybe there is already a way in CodeMirror to escape from an editor with just the keyboard, but I could not find a way.

Additionally, should there be help text added to the Custom HTML widget and plugin/theme editors as was added for Additional CSS in #34?

westonruter commented 7 years ago

The Esc plus Tab is actually already advised on the Theme and Plugin editors:

image

So this is the right approach.