Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Elliott authored Jul 23, 2018
1 parent 89bc8ca commit 338a806
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# a11y-trap-tabs
Vanilla JavaScript function to trap the tab keypress inside an designated element.

## Example
https://codepen.io/seanus1138/full/ZjeaoJ/

## How to use
Mark up your html how ever you would like, just make sure the target element that you will be passing to the `trapTabKey()` function wraps all the elements you want to trap focus to.

Review the code below:

### HTML
```html
<div class="js-target-elm">
<div class="js-target-elem">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
Expand Down

0 comments on commit 338a806

Please sign in to comment.