From 455c56c052a12136540df91a033dfb9647723fc0 Mon Sep 17 00:00:00 2001 From: Scott Vinkle Date: Sat, 26 Aug 2017 02:24:24 -0400 Subject: [PATCH] Added inertElements() method in order to hide all focusable elements not within the modal window content from screen readers. --- brochure/css/launchy.css | 172 +-------------------------------------- brochure/js/launchy.js | 2 +- dist/launchy.js | 2 +- dist/npm/launchy.js | 2 +- dist/npm/package.json | 10 +-- package.json | 8 +- src/launchy.js | 116 ++++++++++++++++++++++---- 7 files changed, 116 insertions(+), 196 deletions(-) diff --git a/brochure/css/launchy.css b/brochure/css/launchy.css index 1994e4e..7e244f2 100644 --- a/brochure/css/launchy.css +++ b/brochure/css/launchy.css @@ -1,170 +1,2 @@ -* { - -webkit-box-sizing: border-box; - box-sizing: border-box; } - -body { - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - background-color: #333; - background-image: radial-gradient(circle at center, Plum, Purple); - display: -webkit-box; - display: -ms-flexbox; - display: flex; - font-family: "Oxygen", sans-serif; - height: 100vh; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - position: relative; } - -a { - color: Purple; - -webkit-text-decoration-skip: ink; - text-decoration-skip: ink; } - a:focus, a:hover { - color: RebeccaPurple; } - -hr { - border: solid transparent 1px; - border-top: solid Silver 1px; - height: 0; - margin: 1.5em 0; - width: 100%; } - -button { - background-color: Purple; - border: 0; - border-radius: 3px; - color: White; - font-family: "Oxygen", sans-serif; - font-weight: 700; - padding: .5em; } - button:focus, button:hover { - background-color: RebeccaPurple; } - -.link-list { - bottom: 0; - left: 50%; - list-style-type: none; - margin-left: -50%; - padding: 0; - position: absolute; - text-align: center; - width: 100%; } - -.link-list__item { - display: inline-block; - margin: 0; } - -.link-list__link { - display: inline-block; - padding: 10px; - position: relative; - text-decoration: none; } - .link-list__link:focus .link-list__tooltip, .link-list__link:hover .link-list__tooltip { - bottom: 100%; - opacity: 1; } - -.link-list__icon { - fill: White; - height: 32px; - width: 32px; } - -.link-list__tooltip { - background-color: #333; - border-radius: 3px; - bottom: 110%; - color: White; - display: inline-block; - font-size: .75em; - left: 50%; - margin-left: -50%; - opacity: 0; - padding: 5px; - position: absolute; - text-align: center; - -webkit-transition: all .3s ease; - transition: all .3s ease; - width: 100%; } - .link-list__tooltip::before { - border: solid transparent 5px; - border-top: solid #333 5px; - content: ''; - height: 0; - left: 50%; - margin-left: -5px; - position: absolute; - top: 100%; - width: 0; } - -.svg-sprite { - display: none; } - -.js [data-launchy] { - display: none; } - -.launchy__window { - background-color: GhostWhite; - border: transparent solid 1px; - border-radius: 3px; - -webkit-box-shadow: 1px 1px 10px Black; - box-shadow: 1px 1px 10px Black; - display: none; - max-width: 30em; - padding: 2em; - position: absolute; - z-index: 9999; } - .launchy__window--is-visible { - display: block; } - .launchy__window--is-visible [data-launchy] { - display: block; } - -.launchy__content { - position: relative; } - -.launchy__overlay { - background-color: Black; - background-color: rgba(0, 0, 0, 0.5); - bottom: 0; - display: none; - left: 0; - position: fixed; - right: 0; - top: 0; - z-index: 9998; } - .launchy__overlay--is-visible { - display: block; } - -.launchy__close-link { - background-color: Purple; - border-radius: 3px; - color: White; - display: inline-block; - font-size: 1.25em; - padding: .15em .5em; - position: absolute; - right: -1em; - text-decoration: none; - top: -1em; } - .launchy__close-link:focus, .launchy__close-link:hover { - background-color: RebeccaPurple; - color: White; } - -.launchy__title { - font-family: "Lobster", sans-serif; - font-size: 2.5em; - margin: 0; } - -.launchy__launch-link { - color: White; - display: inline-block; - font-family: "Lobster", sans-serif; - font-size: 3.5em; - font-weight: 700; - text-decoration: none; - text-shadow: 1px 1px 2px Black; } - .launchy__launch-link:focus, .launchy__launch-link:hover { - color: White; - text-decoration: underline; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhdW5jaHkuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsK0JBQXVCO1VBQXZCLHVCQUF1QixFQUFFOztBQUUzQjtFQUNF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6IFwiTG9ic3RlclwiLCBzYW5zLXNlcmlmO1xuICBmb250LXNpemU6IDIuNWVtO1xuICBtYXJnaW46IDA7IH1cblxuLmxhdW5jaHlfX2xhdW5jaC1saW5rIHtcbiAgY29sb3I6IFdoaXRlO1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIGZvbnQtZmFtaWx5OiBcIkxvYnN0ZXJcIiwgc2Fucy1zZXJpZjtcbiAgZm9udC1zaXplOiAzLjVlbTtcbiAgZm9udC13ZWlnaHQ6IDcwMDtcbiAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICB0ZXh0LXNoYWRvdzogMXB4IDFweCAycHggQmxhY2s7IH1cbiAgLmxhdW5jaHlfX2xhdW5jaC1saW5rOmZvY3VzLCAubGF1bmNoeV9fbGF1bmNoLWxpbms6aG92ZXIge1xuICAgIGNvbG9yOiBXaGl0ZTtcbiAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsgfVxuIl19 */ \ No newline at end of file +*{-webkit-box-sizing:border-box;box-sizing:border-box}body{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#333;background-image:radial-gradient(circle at center, Plum, Purple);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:"Oxygen",sans-serif;height:100vh;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative}a{color:Purple;-webkit-text-decoration-skip:ink;text-decoration-skip:ink}a:focus,a:hover{color:RebeccaPurple}hr{border:solid transparent 1px;border-top:solid Silver 1px;height:0;margin:1.5em 0;width:100%}button{background-color:Purple;border:0;border-radius:3px;color:White;font-family:"Oxygen",sans-serif;font-weight:700;padding:.5em}button:focus,button:hover{background-color:RebeccaPurple}.link-list{bottom:0;left:50%;list-style-type:none;margin-left:-50%;padding:0;position:absolute;text-align:center;width:100%}.link-list__item{display:inline-block;margin:0}.link-list__link{display:inline-block;padding:10px;position:relative;text-decoration:none}.link-list__link:focus .link-list__tooltip,.link-list__link:hover .link-list__tooltip{bottom:100%;opacity:1}.link-list__icon{fill:White;height:32px;width:32px}.link-list__tooltip{background-color:#333;border-radius:3px;bottom:110%;color:White;display:inline-block;font-size:.75em;left:50%;margin-left:-50%;opacity:0;padding:5px;position:absolute;text-align:center;-webkit-transition:all .3s ease;transition:all .3s ease;width:100%}.link-list__tooltip::before{border:solid transparent 5px;border-top:solid #333 5px;content:'';height:0;left:50%;margin-left:-5px;position:absolute;top:100%;width:0}.svg-sprite{display:none}.js [data-launchy]{display:none}.launchy__window{background-color:GhostWhite;border:transparent solid 1px;border-radius:3px;-webkit-box-shadow:1px 1px 10px Black;box-shadow:1px 1px 10px Black;display:none;max-width:30em;padding:2em;position:absolute;z-index:9999}.launchy__window--is-visible{display:block}.launchy__window--is-visible [data-launchy]{display:block}.launchy__content{position:relative}.launchy__overlay{background-color:Black;background-color:rgba(0,0,0,0.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:9998}.launchy__overlay--is-visible{display:block}.launchy__close-link{background-color:Purple;border-radius:3px;color:White;display:inline-block;font-size:1.25em;padding:.15em .5em;position:absolute;right:-1em;text-decoration:none;top:-1em}.launchy__close-link:focus,.launchy__close-link:hover{background-color:RebeccaPurple;color:White}.launchy__title{font-family:"Lobster",sans-serif;font-size:2.5em;margin:0}.launchy__launch-link{color:White;display:inline-block;font-family:"Lobster",sans-serif;font-size:3.5em;font-weight:700;text-decoration:none;text-shadow:1px 1px 2px Black}.launchy__launch-link:focus,.launchy__launch-link:hover{color:White;text-decoration:underline} +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhdW5jaHkuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEVBQUUsOEJBQUEscUJBQXFCLENBQUMsS0FBSyx5QkFBQSxzQkFBQSxtQkFBbUIsc0JBQXNCLGlFQUFpRSxvQkFBQSxvQkFBQSxhQUFhLGdDQUFnQyxhQUFhLHdCQUFBLHFCQUFBLHVCQUF1QixpQk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LmxhdW5jaHlfX2Nsb3NlLWxpbms6aG92ZXJ7YmFja2dyb3VuZC1jb2xvcjpSZWJlY2NhUHVycGxlO2NvbG9yOldoaXRlfS5sYXVuY2h5X190aXRsZXtmb250LWZhbWlseTpcIkxvYnN0ZXJcIixzYW5zLXNlcmlmO2ZvbnQtc2l6ZToyLjVlbTttYXJnaW46MH0ubGF1bmNoeV9fbGF1bmNoLWxpbmt7Y29sb3I6V2hpdGU7ZGlzcGxheTppbmxpbmUtYmxvY2s7Zm9udC1mYW1pbHk6XCJMb2JzdGVyXCIsc2Fucy1zZXJpZjtmb250LXNpemU6My41ZW07Zm9udC13ZWlnaHQ6NzAwO3RleHQtZGVjb3JhdGlvbjpub25lO3RleHQtc2hhZG93OjFweCAxcHggMnB4IEJsYWNrfS5sYXVuY2h5X19sYXVuY2gtbGluazpmb2N1cywubGF1bmNoeV9fbGF1bmNoLWxpbms6aG92ZXJ7Y29sb3I6V2hpdGU7dGV4dC1kZWNvcmF0aW9uOnVuZGVybGluZX1cbiJdfQ== */ \ No newline at end of file diff --git a/brochure/js/launchy.js b/brochure/js/launchy.js index 56851e4..1b80105 100644 --- a/brochure/js/launchy.js +++ b/brochure/js/launchy.js @@ -1 +1 @@ -var Launchy=function(t){function e(a){if(l[a])return l[a].exports;var i=l[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var l={};return e.m=t,e.c=l,e.d=function(t,l,a){e.o(t,l)||Object.defineProperty(t,l,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,"a",l),l},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,l){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var l=0;l`.)"},c=0,u=function(){function t(e){a(this,t),this.focusable=l(1),this.launchyId=c,this.hasTitle=!!e.title,this.modalIsVisible=!1,this.activeElement=null,this.shiftKeyIsPressed=!1,this.allFocusable=null,this.firstFocusable=null,this.lastFocusable=null,this.createElements(e),this.insertElements(e),this.setupEventListeners(),c++}return i(t,[{key:"createElements",value:function(t){this.launchControl=document.createElement(o.launchModal),this.launchControl.id=""+r.launchyControl+this.launchyId,this.launchControl.href="#"+r.launchyDialog+this.launchyId,this.launchControl.classList.add(n.modalLaunchLink),this.launchControl.setAttribute("aria-haspopup","dialog"),this.launchControl.textContent=t.text,this.closeControl=document.createElement(o.closeModal),this.closeControl.id=""+r.launchyCloseControl+this.launchyId,this.closeControl.href="#"+r.launchyControl+this.launchyId,this.closeControl.classList.add(n.modalCloseLink),this.closeControl.setAttribute("aria-label",h.modalClose),this.closeControl.innerHTML='',this.modalWindow=document.createElement(o.modalWindow),this.modalWindow.id=""+r.launchyDialog+this.launchyId,this.modalWindow.classList.add(n.modalWindow),this.modalWindow.setAttribute("tabindex",-1),this.modalWindow.setAttribute("role","dialog"),this.modalWindow.setAttribute("aria-modal",!0),this.hasTitle&&this.modalWindow.setAttribute("aria-labelledby",""+r.modalTitle+this.launchyId),this.modalOverlay=document.createElement(o.modalOverlay),this.modalOverlay.id=""+r.modalOverlay+this.launchyId,this.modalOverlay.classList.add(n.modalOverlay),this.modalOverlay.setAttribute("tabindex",0),this.modalContent=document.createElement(o.modalContent),this.modalContent.classList.add(n.modalContent),this.hasTitle&&(this.modalTitle=document.createElement(o.modalTitle),this.modalTitle.id=""+r.modalTitle+this.launchyId,this.modalTitle.classList.add(n.modalTitle),this.modalTitle.textContent=t.title)}},{key:"insertElements",value:function(t){t.target.parentNode.insertBefore(this.launchControl,t.target),t.target.parentNode.insertBefore(this.modalWindow,t.target),this.modalWindow.appendChild(this.modalContent),this.modalContent.appendChild(this.closeControl),this.hasTitle&&this.modalContent.appendChild(this.modalTitle),this.modalContent.appendChild(t.target),document.body.appendChild(this.modalOverlay)}},{key:"setupEventListeners",value:function(){this.launchControl.addEventListener("click",this.showModal.bind(this),!1),this.closeControl.addEventListener("click",this.hideModal.bind(this),!1),this.modalOverlay.addEventListener("click",this.hideModal.bind(this),!1),document.addEventListener("focus",this.trapFocus.bind(this),!0),document.addEventListener("keydown",this.checkEsc.bind(this),!1)}},{key:"showModal",value:function(t){t.preventDefault(),this.activeElement=document.activeElement,this.modalIsVisible=!0,this.allFocusable=this.modalWindow.querySelectorAll(this.focusable),this.firstFocusable=this.allFocusable[0],this.lastFocusable=this.allFocusable[this.allFocusable.length-1],this.modalWindow.classList.add(n.modalWindowIsVisible),this.modalOverlay.classList.add(n.modalOverlayIsVisible),this.modalWindow.setAttribute("aria-hidden",!1),this.modalWindow.focus()}},{key:"hideModal",value:function(t){t.preventDefault(),this.modalIsVisible=!1,this.allFocusable=null,this.firstFocusable=null,this.lastFocusable=null,this.modalWindow.classList.remove(n.modalWindowIsVisible),this.modalOverlay.classList.remove(n.modalOverlayIsVisible),this.modalWindow.setAttribute("aria-hidden",!0),this.activeElement.focus()}},{key:"trapFocus",value:function(t){this.modalIsVisible&&!this.modalWindow.contains(t.target)&&(t.stopPropagation(),this.shiftKeyIsPressed?this.lastFocusable.focus():this.firstFocusable.focus())}},{key:"checkEsc",value:function(t){this.modalIsVisible&&(this.shiftKeyIsPressed=t.shiftKey,t.keyCode===d.Escape&&this.hideModal(t))}}]),t}(),m=function(){var t=document.querySelectorAll(r.launchyElements),e=null,l=null,a=!0,i=!1,o=void 0;try{for(var n,d=Array.from(t)[Symbol.iterator]();!(a=(n=d.next()).done);a=!0){var c=n.value;if(e=c.getAttribute(s.launchyText),l=c.getAttribute(s.launchyTitle),!e)throw Error(h.modalError);if(""===e.trim())throw Error(h.modalErrorEmpty);l||console.warn(h.modalWarning);new u({target:c,text:e,title:l})}}catch(t){i=!0,o=t}finally{try{!a&&d.return&&d.return()}finally{if(i)throw o}}};document.addEventListener("DOMContentLoaded",m,!1),e.Launchy=u},function(t,e){t.exports='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]'}]); \ No newline at end of file +var Launchy=function(t){function e(l){if(a[l])return a[l].exports;var i=a[l]={i:l,l:!1,exports:{}};return t[l].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var a={};return e.m=t,e.c=a,e.d=function(t,a,l){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:l})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,a){"use strict";function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var a=0;a