electerious / electerious/basicLightbox

Managing focus

オープン
#28 コメント 9 件 リアクション 6 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
604
フォーク
57
PR マージ指標
30日以内にマージされた PR はありません

説明

Looking at the demos it looks like there is some focus management missing on the modals. Here's what needs to be added to fix it:

* When a modal is open, focus should be sent to the modal (either on the element itself via .focus() and tabindex="-1" or sent to the first interactive element.

* When a modal is open, focus should be trapped inside the modal (so you can't access elements behind it when tabbing with the keyboard).

* When a modal is open, pressing the escape key should close the modal.

* It would be nice if the modals had an explicit close button with an accessible name (e.g. `X`.

* When a modal is closed, focus should be send back to the element which opened it.

An example of an accessible modal:
http://edenspiekermann.github.io/a11y-dialog/example/

The WAI-ARIA authoring practices guide on modals:
https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。