A Ember modifier to trap your focus.
npm install ember-focus-trap
Ember Focus Trap: A Ember modifier to trap your focus.
We use focus-trap as a lower-level implementation.
It is super lightweight and has minimal dependencies.
Trap focus within a DOM node.
There may come a time when you find it important to trap focus within a DOM node — so that when a user hits Tab or Shift+Tab or clicks around, she can"t escape a certain cycle of focusable elements.
Please read the focus-trap documentation to understand what a focus trap is, what happens when a focus trap is activated, and what happens when one is deactivated.
* Ember.js v3.16 or above (Ember v4 compatible)
* Ember CLI v3.20 or above
* Node.js v12 or above
```
ember install ember-focus-trap
See demos and read the documentation here.
`hbs`
`hbs
{{focus-trap
focusTrapOptions=(hash
onDeactivate=(action this.myFunction)
initialFocus="#initial-focusee"
)
}}
>
Here is a focus trap
with
some
focusable
parts.
See the Contributing guide for details.
This project is licensed under the MIT License.