Skip to content

Commit

Permalink
Use tabindex="-1" for focusing with JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
deoostfrees committed Oct 20, 2020
1 parent 970879c commit eda6347
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/js/parvus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Parvus
*
* @author de Oostfreese
* @version 1.1.0
* @version 1.1.1
* @url https://github.com/deoostfreese/parvus
*
* MIT license
Expand Down Expand Up @@ -129,7 +129,7 @@
lightbox = document.createElement('div');
lightbox.setAttribute('role', 'dialog');
lightbox.setAttribute('aria-hidden', 'true');
lightbox.setAttribute('tabindex', '0');
lightbox.setAttribute('tabindex', '-1');
lightbox.setAttribute('aria-label', config.lightboxLabel);
lightbox.classList.add('parvus'); // Create the lightbox overlay container

Expand Down
4 changes: 2 additions & 2 deletions dist/js/parvus.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/js/parvus.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function parvus (userOptions) {
lightbox = document.createElement('div')
lightbox.setAttribute('role', 'dialog')
lightbox.setAttribute('aria-hidden', 'true')
lightbox.setAttribute('tabindex', '0')
lightbox.setAttribute('tabindex', '-1')
lightbox.setAttribute('aria-label', config.lightboxLabel)
lightbox.classList.add('parvus')

Expand Down

0 comments on commit eda6347

Please sign in to comment.