0.5.1 • Published 5 months ago

makeup-screenreader-trap v0.5.1

Weekly downloads
556
License
MIT
Repository
github
Last release
5 months ago

makeup-screenreader-trap

This module restricts screen reader virtual cursor to a single subtree in the DOM. This behaviour is useful when implementing a modal interface (e.g. a modal dialog).

import * as screenreaderTrap from "makeup-screenreader-trap";

// trap an element
screenreaderTrap.trap(document.querySelector("el"));

// untrap the current trapped element
screenreaderTrap.untrap();

Experimental

This module is still in an experimental state, until it reaches v1 you must consider all minor releases as breaking changes.

Options

  • useHiddenProperty: use hidden property instead of aria-hidden (default: false)

Events

  • screenreaderTrap : fired by trapped element when screenreader trap is activated
  • screenreaderUntrap : fired by trapped element when screenreader trap is deactivated
0.5.1

5 months ago

0.5.0

7 months ago

0.4.2

7 months ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago