jupyter-book / thebe

Turn static HTML pages into live documents with Jupyter kernels.
https://thebe.readthedocs.io
BSD 3-Clause "New" or "Revised" License
395 stars 68 forks source link

remediate wcag 2.1.2 - no keyboard trap #748

Closed tonyfast closed 4 months ago

tonyfast commented 5 months ago

hey y'all, i figured i'd kick off this discussion with a pull request instead of an issue. i'm proposing to add support for the Esc. currently, thebe violates Success Criterion 2.1.2 (No Keyboard Trap). this pull request applies technique G21: Ensuring that users are not trapped in content so that when Esc is pressed we use cm.display.input.blur() to remove focus from the editor allowing keyboard users to continue through their natural tab order.

i'm not really great at js development or testing so i'd appreciate any pointers to cleaning up the pr.

welcome[bot] commented 5 months ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada: