a11y-dialog
Advanced tools
Comparing version 2.2.0 to 2.3.0
(function (global) { | ||
'use strict'; | ||
// Helper function for dispatching cross browser dispatch events | ||
// from http://youmightnotneedjquery.com/#trigger_custom | ||
function dispatchEvent (el, eventName) { | ||
var event; | ||
if (window.CustomEvent) { | ||
event = new CustomEvent(eventName); | ||
} else { | ||
event = document.createEvent('CustomEvent'); | ||
event.initCustomEvent(eventName, true, true); | ||
} | ||
el.dispatchEvent(event); | ||
} | ||
// Helper function to get all focusable children from a node | ||
@@ -86,2 +101,3 @@ function getFocusableChildren (node) { | ||
document.body.addEventListener('focus', maintainFocus, true); | ||
dispatchEvent(node, 'dialog:show'); | ||
} | ||
@@ -95,2 +111,3 @@ | ||
document.body.removeEventListener('focus', maintainFocus, true); | ||
dispatchEvent(node, 'dialog:hide'); | ||
} | ||
@@ -97,0 +114,0 @@ }; |
{ | ||
"name": "a11y-dialog", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "A tiny script to make dialog windows accessible to assistive technology users.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/edenspiekermann/a11y-dialog", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103
6078
3
1
0