a11y-dialog

A tiny script to make dialog windows accessible to assistive technology users.

Usage no npm install needed!

<script type="module">
  import a11yDialog from 'https://cdn.skypack.dev/a11y-dialog';
</script>

README

A11y Dialog

This is a lightweight (1.3Kb) yet flexible script to create accessible dialog windows.

Features:

  • Closing dialog on overlay click and ESC
  • Toggling aria-* attributes
  • Trapping and restoring focus
  • Firing events
  • DOM and JS APIs
  • Fast and tiny