Outils d'analyse web
Les outils automatiques de vérification de l'accessibilité d'un site ne permettent pas de s'assurer de la conformité totale d'une site web. Toutefois, leur utilisation permet de corriger des erreurs et de guider le développer dans l'amélioration de son site.
Débogage dans le navigateur
Le débogage consiste à rechercher et corriger les erreurs dans son code. Un code sans erreur permet notamment un meilleur affichage dans le navigateur.
Dans Firefox
Dans firefox, l’outil de débogage s’obtient via la combinaisonde touches CTRL
+ MAJ
+ I
.
Ses principales fonctionnalités sont:
- Accès simultané au code HTML, aux feuilles de style CSS ou aux scripts présents dans la page
- Surlignage des différents éléments avec visualisation du code correspondant
- Éditer et modifier à la volée du code HTML : rendu visuel immédiat
- Pour les scripts, l’outils propose un débugger.
- Possibilité d’évaluer le temps de chargement des différents éléments de la page (scripts, images, feuilles de style, …).
Dans Chrome
Dans Chrome, l’outil de débogage s’obtient via la touche F12
.
Ses principales fonctionnalités sont:
- Accès simultané au code HTML, aux feuilles de style CSS ou aux scripts présents dans la page
- Surlignage des différents éléments avec visualisation du code correspondant
- Éditer et modifier à la volée du code HTML : rendu visuel immédiat
- Pour les scripts, l’outils propose un débugger.
- Possibilité d’évaluer le temps de chargement des différents éléments de la page (scripts, images, feuilles de style, …).
Les extensions de navigateurs
Il est possible d’installer des extensions dans son navigateur web pour examiner et manipuler le code des pages Web.
L’installation des extensions étant différentes d’un navigateur à l’autre, seul le nom de l’extension est mentionné.
WebDeveloper
C’est le “couteau suisse” du développeur Web pour examiner et manipuler les pages Web.
Ses principales fonctionnalités sont :
- Activer/désactiver le javascript, le cache,…
- Manipuler les cookies
- Examiner les CSS
- Redimensionner les pages (résolutions)
- Manipuler les formulaires
- Valider les pages
HTML Validator
Validateur HTML basé sur la librairie Tidy (développée par le W3C à l’origine) et SGML (validateur actuel du W3C). Ce dernier est plus restrictif. Le validateur est présent sous la forme d’une icône située à droite de la barre de statut, et vérifie toutes les pages sur lesquelles vous naviguez ou intégrer dans les outils de développement. Cet outil s’active depuis les outils de développements de son navigateur.
Ses principales fonctionnalités sont :
- Signale les erreurs de validation et indique quand c’est possible la façon d’y remédier
- Permet de valider sans passer par les validateurs officiels du W3C, parfois débordés.
Lighthouse
Lighthouse est un outil open source automatisé permettant d’améliorer les performances, la qualité et l’exactitude de vos applications Web. Lors de l’audit d’une page, Lighthouse exécute une série de tests sur la page, puis génère un rapport sur les performances de la page. À partir de là, vous pouvez utiliser les tests défaillants comme indicateurs pour améliorer votre site web.
Tanaguru webext RGAA
Tanaguru webext RGAA est une extension à rajouter à son navigateur web qui sert à évaluer l’accessibilité des pages web. Il analyse le code source généré sur la base des tests du RGAA. Cet outil s’active depuis les outils de développements de son navigateur.
Comme tout outil automatique, il ne détecte pas toutes les erreurs d’accessibilité. Obtenir un résultat confome avec cet outil signifie qu’au plus 40% de votre site est conforme en matière d’accessibilité.
Wave
Cette extension a l’avantage de pouvoir être utilisée sur des pages en local.
Ses principales fonctionnalités sont :
- analyse des erreurs globales et des erreurs de contrastes de couleurs
- repérage des éléments de structuration de la page
- affichage des erreurs et alertes
- analyse des attributs
ARIA
.
Marque-pages à ajouter à son navigateur
Cliquer-glisser les marques-pages ci-après dans sa barre de menu du navigateur.
-
A11y-outline : régions, titres et liens.
Créer un nouveau raccourci et copier le code suivant dans la zone “URL”
javascript:(function(){(function%20e(t,n,r)%7Bfunction%20s(o,u)%7Bif(!n%5Bo%5D)%7Bif(!t%5Bo%5D)%7Bvar%20a=typeof%20require==%22function%22&&require;if(!u&&a)return%20a(o,!0);if(i)return%20i(o,!0);var%20f=new%20Error(%22Cannot%20find%20module%20'%22+o+%22'%22);throw%20f.code=%22MODULE_NOT_FOUND%22,f%7Dvar%20l=n%5Bo%5D=%7Bexports:%7B%7D%7D;t%5Bo%5D%5B0%5D.call(l.exports,function(e)%7Bvar%20n=t%5Bo%5D%5B1%5D%5Be%5D;return%20s(n?n:e)%7D,l,l.exports,e,t,n,r)%7Dreturn%20n%5Bo%5D.exports%7Dvar%20i=typeof%20require==%22function%22&&require;for(var%20o=0;o%3Cr.length;o++)s(r%5Bo%5D);return%20s%7D)(%7B1:%5Bfunction(require,module,exports)%7Bvar%20query=require(%22./lib/query.js%22);var%20name=require(%22./lib/name.js%22);module.exports=%7BgetRole:query.getRole,getAttribute:query.getAttribute,getName:name.getName,getDescription:name.getDescription,matches:query.matches,querySelector:query.querySelector,querySelectorAll:query.querySelectorAll,closest:query.closest%7D%7D,%7B%22./lib/name.js%22:3,%22./lib/query.js%22:4%7D%5D,2:%5Bfunction(require,module,exports)%7Bexports.attributes=%7Bautocomplete:%22token%22,checked:%22tristate%22,current:%22token%22,disabled:%22bool%22,expanded:%22bool-undefined%22,haspopup:%22token%22,hidden:%22bool%22,invalid:%22token%22,keyshortcuts:%22string%22,label:%22string%22,level:%22int%22,modal:%22bool%22,multiline:%22bool%22,multiselectable:%22bool%22,orientation:%22token%22,placeholder:%22string%22,pressed:%22tristate%22,readonly:%22bool%22,required:%22bool%22,roledescription:%22string%22,selected:%22bool-undefined%22,valuemax:%22number%22,valuemin:%22number%22,valuenow:%22number%22,valuetext:%22string%22,atomic:%22bool%22,busy:%22bool%22,live:%22token%22,relevant:%22token-list%22,dropeffect:%22token-list%22,grabbed:%22bool-undefined%22,activedescendant:%22id%22,colcount:%22int%22,colindex:%22int%22,colspan:%22int%22,controls:%22id-list%22,describedby:%22id-list%22,details:%22id%22,errormessage:%22id%22,flowto:%22id-list%22,labelledby:%22id-list%22,owns:%22id-list%22,posinset:%22int%22,rowcount:%22int%22,rowindex:%22int%22,rowspan:%22int%22,setsize:%22int%22,sort:%22token%22%7D;exports.extraSelectors=%7Barticle:%5B%22article%22%5D,button:%5B%22button%22,'input%5Btype=%22button%22%5D','input%5Btype=%22image%22%5D','input%5Btype=%22reset%22%5D','input%5Btype=%22submit%22%5D',%22summary%22%5D,cell:%5B%22td%22%5D,checkbox:%5B'input%5Btype=%22checkbox%22%5D'%5D,combobox:%5B%22input:not(%5Btype%5D)%5Blist%5D%22,'input%5Btype=%22email%22%5D%5Blist%5D','input%5Btype=%22search%22%5D%5Blist%5D','input%5Btype=%22tel%22%5D%5Blist%5D','input%5Btype=%22text%22%5D%5Blist%5D','input%5Btype=%22url%22%5D%5Blist%5D',%22select:not(%5Bmultiple%5D)%22%5D,complementary:%5B%22aside%22%5D,definition:%5B%22dd%22%5D,dialog:%5B%22dialog%22%5D,document:%5B%22body%22%5D,figure:%5B%22figure%22%5D,form:%5B%22form%5Baria-label%5D%22,%22form%5Baria-labelledby%5D%22%5D,group:%5B%22details%22,%22optgroup%22%5D,heading:%5B%22h1%22,%22h2%22,%22h3%22,%22h4%22,%22h5%22,%22h6%22%5D,img:%5B'img:not(%5Balt=%22%22%5D)'%5D,link:%5B%22a%5Bhref%5D%22,%22area%5Bhref%5D%22,%22link%5Bhref%5D%22%5D,list:%5B%22dl%22,%22ol%22,%22ul%22%5D,listbox:%5B%22select%5Bmultiple%5D%22%5D,listitem:%5B%22dt%22,%22ul%20%3E%20li%22,%22ol%20%3E%20li%22%5D,main:%5B%22main%22%5D,math:%5B%22math%22%5D,menuitemcheckbox:%5B'menuitem%5Btype=%22checkbox%22%5D'%5D,menuitem:%5B'menuitem%5Btype=%22command%22%5D'%5D,menuitemradio:%5B'menuitem%5Btype=%22radio%22%5D'%5D,menu:%5B'menu%5Btype=%22context%22%5D'%5D,navigation:%5B%22nav%22%5D,option:%5B%22option%22%5D,progressbar:%5B%22progress%22%5D,radio:%5B'input%5Btype=%22radio%22%5D'%5D,region:%5B%22section%5Baria-label%5D%22,%22section%5Baria-labelledby%5D%22%5D,rowgroup:%5B%22tbody%22,%22thead%22,%22tfoot%22%5D,row:%5B%22tr%22%5D,searchbox:%5B'input%5Btype=%22search%22%5D:not(%5Blist%5D)'%5D,separator:%5B%22hr%22%5D,slider:%5B'input%5Btype=%22range%22%5D'%5D,spinbutton:%5B'input%5Btype=%22number%22%5D'%5D,status:%5B%22output%22%5D,table:%5B%22table%22%5D,textbox:%5B%22input:not(%5Btype%5D):not(%5Blist%5D)%22,'input%5Btype=%22email%22%5D:not(%5Blist%5D)','input%5Btype=%22tel%22%5D:not(%5Blist%5D)','input%5Btype=%22text%22%5D:not(%5Blist%5D)','input%5Btype=%22url%22%5D:not(%5Blist%5D)',%22textarea%22%5D,rowheader:%5B'th%5Bscope=%22row%22%5D'%5D,columnheader:%5B'th%5Bscope=%22col%22%5D'%5D%7D;exports.scoped=%5B%22article%20*%22,%22aside%20*%22,%22main%20*%22,%22nav%20*%22,%22section%20*%22%5D.join(%22,%22);var%20subRoles=%7Bcell:%5B%22gridcell%22,%22rowheader%22%5D,command:%5B%22button%22,%22link%22,%22menuitem%22%5D,composite:%5B%22grid%22,%22select%22,%22spinbutton%22,%22tablist%22%5D,img:%5B%22doc-cover%22%5D,input:%5B%22checkbox%22,%22option%22,%22radio%22,%22slider%22,%22spinbutton%22,%22textbox%22%5D,landmark:%5B%22banner%22,%22complementary%22,%22contentinfo%22,%22doc-acknowledgments%22,%22doc-afterword%22,%22doc-appendix%22,%22doc-bibliography%22,%22doc-chapter%22,%22doc-conclusion%22,%22doc-credits%22,%22doc-endnotes%22,%22doc-epilogue%22,%22doc-errata%22,%22doc-foreword%22,%22doc-glossary%22,%22doc-introduction%22,%22doc-part%22,%22doc-preface%22,%22doc-prologue%22,%22form%22,%22main%22,%22navigation%22,%22region%22,%22search%22%5D,range:%5B%22progressbar%22,%22scrollbar%22,%22slider%22,%22spinbutton%22%5D,roletype:%5B%22structure%22,%22widget%22,%22window%22%5D,section:%5B%22alert%22,%22cell%22,%22definition%22,%22doc-abstract%22,%22doc-colophon%22,%22doc-credit%22,%22doc-dedication%22,%22doc-epigraph%22,%22doc-example%22,%22doc-footnote%22,%22doc-qna%22,%22figure%22,%22group%22,%22img%22,%22landmark%22,%22list%22,%22listitem%22,%22log%22,%22marquee%22,%22math%22,%22note%22,%22status%22,%22table%22,%22tabpanel%22,%22term%22,%22tooltip%22%5D,sectionhead:%5B%22columnheader%22,%22doc-subtitle%22,%22heading%22,%22rowheader%22,%22tab%22%5D,select:%5B%22combobox%22,%22listbox%22,%22menu%22,%22radiogroup%22,%22tree%22%5D,separator:%5B%22doc-pagebreak%22%5D,structure:%5B%22application%22,%22document%22,%22none%22,%22presentation%22,%22rowgroup%22,%22section%22,%22sectionhead%22,%22separator%22%5D,table:%5B%22grid%22%5D,textbox:%5B%22searchbox%22%5D,widget:%5B%22command%22,%22composite%22,%22gridcell%22,%22input%22,%22range%22,%22row%22,%22separator%22,%22tab%22%5D,window:%5B%22dialog%22%5D,alert:%5B%22alertdialog%22%5D,checkbox:%5B%22menuitemcheckbox%22,%22switch%22%5D,dialog:%5B%22alertdialog%22%5D,gridcell:%5B%22columnheader%22,%22rowheader%22%5D,menuitem:%5B%22menuitemcheckbox%22%5D,menuitemcheckbox:%5B%22menuitemradio%22%5D,option:%5B%22treeitem%22%5D,radio:%5B%22menuitemradio%22%5D,status:%5B%22timer%22%5D,grid:%5B%22treegrid%22%5D,menu:%5B%22menubar%22%5D,tree:%5B%22treegrid%22%5D,document:%5B%22article%22%5D,group:%5B%22row%22,%22select%22,%22toolbar%22%5D,link:%5B%22doc-backlink%22,%22doc-biblioref%22,%22doc-glossref%22,%22doc-noteref%22%5D,list:%5B%22directory%22,%22feed%22%5D,listitem:%5B%22doc-biblioentry%22,%22doc-endnote%22,%22treeitem%22%5D,navigation:%5B%22doc-index%22,%22doc-pagelist%22,%22doc-toc%22%5D,note:%5B%22doc-notice%22,%22doc-tip%22%5D%7D;var%20getSubRoles=function(role)%7Bvar%20children=subRoles%5Brole%5D%7C%7C%5B%5D;var%20descendents=children.map(getSubRoles);var%20result=%5Brole%5D;descendents.forEach(function(list)%7Blist.forEach(function(r)%7Bif(result.indexOf(r)===-1)%7Bresult.push(r)%7D%7D)%7D);return%20result%7D;exports.subRoles=%7B%7D;for(var%20role%20in%20subRoles)%7Bexports.subRoles%5Brole%5D=getSubRoles(role)%7Dexports.subRoles%5B%22none%22%5D=%5B%22none%22,%22presentation%22%5D;exports.subRoles%5B%22presentation%22%5D=%5B%22presentation%22,%22none%22%5D;exports.nameFromContents=%5B%22button%22,%22checkbox%22,%22columnheader%22,%22doc-backlink%22,%22doc-biblioref%22,%22doc-glossref%22,%22doc-noteref%22,%22gridcell%22,%22heading%22,%22link%22,%22menuitem%22,%22menuitemcheckbox%22,%22menuitemradio%22,%22option%22,%22radio%22,%22row%22,%22rowgroup%22,%22rowheader%22,%22sectionhead%22,%22tab%22,%22tooltip%22,%22treeitem%22,%22switch%22%5D;exports.labelable=%5B%22button%22,'input:not(%5Btype=%22hidden%22%5D)',%22keygen%22,%22meter%22,%22output%22,%22progress%22,%22select%22,%22textarea%22%5D%7D,%7B%7D%5D,3:%5Bfunction(require,module,exports)%7Bvar%20constants=require(%22./constants.js%22);var%20query=require(%22./query.js%22);var%20util=require(%22./util.js%22);var%20getPseudoContent=function(node,selector)%7Bvar%20styles=window.getComputedStyle(node,selector);var%20ret=styles.getPropertyValue(%22content%22);if(!ret)%7Breturn%22%22%7Dif(ret.substr(0,1)!=='%22')%7Breturn%22%22%7Delse%7Breturn%20ret.slice(1,-1)%7D%7D;var%20getContent=function(root,referenced)%7Bvar%20ret=%22%22;var%20node=root.firstChild;while(node)%7Bif(node.nodeType===node.TEXT_NODE)%7Bret+=node.textContent%7Delse%20if(node.nodeType===node.ELEMENT_NODE)%7Bif(node.tagName.toLowerCase()===%22br%22)%7Bret+=%22%5Cn%22%7Delse%20if(window.getComputedStyle(node).display.substr(0,6)===%22inline%22&&node.tagName.toLowerCase()!==%22input%22&&node.tagName.toLowerCase()!==%22img%22)%7Bret+=getName(node,true,referenced)%7Delse%7Bret+=%22%20%22+getName(node,true,referenced)+%22%20%22%7D%7Dnode=node.nextSibling%7Dreturn%20ret%7D;var%20allowNameFromContent=function(el)%7Bvar%20role=query.getRole(el);return!role%7C%7Cconstants.nameFromContents.indexOf(role)!==-1%7D;var%20isLabelable=function(el)%7Bvar%20selector=constants.labelable.join(%22,%22);return%20el.matches(selector)%7D;var%20getLabelNodes=function(element)%7Bvar%20labels=%5B%5D;var%20labelable=constants.labelable.join(%22,%22);util.walkDOM(document.body,function(node)%7Bif(node.tagName&&node.tagName.toLowerCase()===%22label%22)%7Bif(node.getAttribute(%22for%22))%7Bif(element.id&&node.getAttribute(%22for%22)===element.id)%7Blabels.push(node)%7D%7Delse%20if(node.querySelector(labelable)===element)%7Blabels.push(node)%7D%7D%7D);return%20labels%7D;var%20getName=function(el,recursive,referenced)%7Bvar%20ret=%22%22;if(query.getAttribute(el,%22hidden%22,referenced))%7Breturn%22%22%7Dif(query.matches(el,%22presentation%22))%7Breturn%20getContent(el,referenced)%7Dif(!recursive&&el.matches(%22%5Baria-labelledby%5D%22))%7Bvar%20ids=el.getAttribute(%22aria-labelledby%22).split(/%5Cs+/);var%20strings=ids.map(function(id)%7Bvar%20label=document.getElementById(id);return%20getName(label,true,label)%7D);ret=strings.join(%22%20%22)%7Dif(!ret.trim()&&el.matches(%22%5Baria-label%5D%22))%7Bret=el.getAttribute(%22aria-label%22)%7Dif(!query.matches(el,%22presentation%22))%7Bif(!ret&&!recursive&&isLabelable(el))%7Bvar%20strings=getLabelNodes(el).map(function(label)%7Breturn%20getName(label,true,label)%7D);ret=strings.join(%22%20%22)%7Dif(!ret.trim())%7Bret=el.getAttribute(%22placeholder%22)%7C%7C%22%22%7Dif(!ret.trim())%7Bret=el.getAttribute(%22alt%22)%7C%7C%22%22%7Dif(!ret.trim()&&el.matches(%22abbr,acronym%22)&&el.title)%7Bret=el.title%7D%7Dif(!ret.trim()&&query.matches(el,%22textbox,button,combobox,range,menu%22))%7Bif(query.matches(el,%22textbox,button%22))%7Bret=el.value%7C%7Cel.textContent%7Delse%20if(query.matches(el,%22combobox,menu%22))%7Bvar%20selected=query.querySelector(el,%22:selected%22)%7C%7Cquery.querySelector(el,%22option,menuitem%22);if(selected)%7Bret=getName(selected,recursive,referenced)%7D%7Delse%20if(query.matches(el,%22range%22))%7Bret=%22%22+(query.getAttribute(el,%22valuetext%22)%7C%7Cquery.getAttribute(el,%22valuenow%22)%7C%7Cel.value)%7D%7Dif(!ret.trim()&&(recursive%7C%7CallowNameFromContent(el)))%7Bret=getContent(el,referenced)%7Dif(!ret.trim())%7Bret=el.title%7C%7C%22%22%7Dvar%20before=getPseudoContent(el,%22:before%22);var%20after=getPseudoContent(el,%22:after%22);return%20before+ret+after%7D;var%20getDescription=function(el)%7Bvar%20ret=%22%22;if(el.matches(%22%5Baria-describedby%5D%22))%7Bvar%20ids=el.getAttribute(%22aria-describedby%22).split(/%5Cs+/);var%20strings=ids.map(function(id)%7Bvar%20label=document.getElementById(id);return%20getName(label,true,label)%7D);ret=strings.join(%22%20%22)%7Delse%20if(el.title)%7Bret=el.title%7Delse%20if(el.placeholder)%7Bret=el.placeholder%7Dreturn(ret%7C%7C%22%22).trim().replace(/%5Cs+/g,%22%20%22)%7D;module.exports=%7BgetName:function(el)%7Breturn%20getName(el).replace(/%5Cs+/g,%22%20%22).trim()%7D,getDescription:getDescription%7D%7D,%7B%22./constants.js%22:2,%22./query.js%22:4,%22./util.js%22:5%7D%5D,4:%5Bfunction(require,module,exports)%7Bvar%20constants=require(%22./constants.js%22);var%20util=require(%22./util.js%22);var%20getSubRoles=function(roles)%7Breturn%5B%5D.concat.apply(%5B%5D,roles.map(function(role)%7Breturn%20constants.subRoles%5Brole%5D%7C%7C%5Brole%5D%7D))%7D;var%20_getRole=function(el,candidates)%7Bif(el.hasAttribute(%22role%22))%7Breturn%20el.getAttribute(%22role%22)%7Dfor(var%20role%20in%20constants.extraSelectors)%7Bvar%20selector=constants.extraSelectors%5Brole%5D.join(%22,%22);if((!candidates%7C%7Ccandidates.indexOf(role)!==-1)&&el.matches(selector))%7Breturn%20role%7D%7Dif(!candidates%7C%7Ccandidates.indexOf(%22banner%22)!==-1%7C%7Ccandidates.indexOf(%22contentinfo%22)!==-1)%7Bvar%20scoped=el.matches(constants.scoped);if(el.matches(%22header%22)&&!scoped)%7Breturn%22banner%22%7Dif(el.matches(%22footer%22)&&!scoped)%7Breturn%22contentinfo%22%7D%7D%7D;var%20getAttribute=function(el,key,_hiddenRoot)%7Bif(key===%22hidden%22&&el===_hiddenRoot)%7Breturn%20false%7Dvar%20type=constants.attributes%5Bkey%5D;var%20raw=el.getAttribute(%22aria-%22+key);if(raw)%7Bif(type===%22bool%22)%7Breturn%20raw===%22true%22%7Delse%20if(type===%22tristate%22)%7Breturn%20raw===%22true%22?true:raw===%22false%22?false:%22mixed%22%7Delse%20if(type===%22bool-undefined%22)%7Breturn%20raw===%22true%22?true:raw===%22false%22?false:undefined%7Delse%20if(type===%22id-list%22)%7Breturn%20raw.split(/%5Cs+/)%7Delse%20if(type===%22integer%22)%7Breturn%20parseInt(raw)%7Delse%20if(type===%22number%22)%7Breturn%20parseFloat(raw)%7Delse%20if(type===%22token-list%22)%7Breturn%20raw.split(/%5Cs+/)%7Delse%7Breturn%20raw%7D%7Dif(key===%22level%22)%7Bfor(var%20i=1;i%3C=6;i++)%7Bif(el.tagName.toLowerCase()===%22h%22+i)%7Breturn%20i%7D%7D%7Delse%20if(key===%22disabled%22)%7Breturn%20el.disabled%7Delse%20if(key===%22placeholder%22)%7Breturn%20el.placeholder%7Delse%20if(key===%22required%22)%7Breturn%20el.required%7Delse%20if(key===%22readonly%22)%7Breturn%20el.readOnly&&!el.isContentEditable%7Delse%20if(key===%22hidden%22)%7Bvar%20style=window.getComputedStyle(el);if(el.hidden%7C%7Cstyle.display===%22none%22%7C%7Cstyle.visibility===%22hidden%22)%7Breturn%20true%7Delse%20if(el.clientHeight===0)%7Breturn%20el.parentNode&&getAttribute(el.parentNode,%22hidden%22,_hiddenRoot)%7D%7Delse%20if(key===%22invalid%22&&el.checkValidity)%7Breturn%20el.checkValidity()%7Dif(type===%22bool%22%7C%7Ctype===%22tristate%22)%7Breturn%20false%7D%7D;var%20matches=function(el,selector)%7Bvar%20actual;if(selector.substr(0,1)===%22:%22)%7Bvar%20attr=selector.substr(1);return%20getAttribute(el,attr)%7Delse%20if(selector.substr(0,1)===%22%5B%22)%7Bvar%20match=/%5C%5B(%5Ba-z%5D+)=%22(.*)%22%5C%5D/.exec(selector);actual=getAttribute(el,match%5B1%5D);var%20rawValue=match%5B2%5D;return%20actual.toString()==rawValue%7Delse%7Bvar%20candidates=getSubRoles(selector.split(%22,%22));actual=_getRole(el,candidates);return%20candidates.indexOf(actual)!==-1%7D%7D;var%20_querySelector=function(all)%7Breturn%20function(root,role)%7Bvar%20results=%5B%5D;util.walkDOM(root,function(node)%7Bif(node.nodeType===node.ELEMENT_NODE)%7Bif(matches(node,role))%7Bresults.push(node);if(!all)%7Breturn%20false%7D%7D%7D%7D);return%20all?results:results%5B0%5D%7D%7D;var%20closest=function(el,selector)%7Breturn%20util.searchUp(el,function(candidate)%7Breturn%20matches(candidate,selector)%7D)%7D;module.exports=%7BgetRole:function(el)%7Breturn%20_getRole(el)%7D,getAttribute:getAttribute,matches:matches,querySelector:_querySelector(),querySelectorAll:_querySelector(true),closest:closest%7D%7D,%7B%22./constants.js%22:2,%22./util.js%22:5%7D%5D,5:%5Bfunction(require,module,exports)%7Bvar%20walkDOM=function(root,fn)%7Bif(fn(root)===false)%7Breturn%20false%7Dvar%20node=root.firstChild;while(node)%7Bif(walkDOM(node,fn)===false)%7Breturn%20false%7Dnode=node.nextSibling%7D%7D;var%20searchUp=function(el,test)%7Bvar%20candidate=el.parentElement;if(candidate)%7Bif(test(candidate))%7Breturn%20candidate%7Delse%7Breturn%20searchUp(candidate,test)%7D%7D%7D;module.exports=%7BwalkDOM:walkDOM,searchUp:searchUp%7D%7D,%7B%7D%5D,6:%5Bfunction(require,module,exports)%7B(function()%7Bvar%20supportCustomEvent=window.CustomEvent;if(!supportCustomEvent%7C%7Ctypeof%20supportCustomEvent===%22object%22)%7BsupportCustomEvent=function%20CustomEvent(event,x)%7Bx=x%7C%7C%7B%7D;var%20ev=document.createEvent(%22CustomEvent%22);ev.initCustomEvent(event,!!x.bubbles,!!x.cancelable,x.detail%7C%7Cnull);return%20ev%7D;supportCustomEvent.prototype=window.Event.prototype%7Dfunction%20createsStackingContext(el)%7Bwhile(el&&el!==document.body)%7Bvar%20s=window.getComputedStyle(el);var%20invalid=function(k,ok)%7Breturn!(s%5Bk%5D===undefined%7C%7Cs%5Bk%5D===ok)%7D;if(s.opacity%3C1%7C%7Cinvalid(%22zIndex%22,%22auto%22)%7C%7Cinvalid(%22transform%22,%22none%22)%7C%7Cinvalid(%22mixBlendMode%22,%22normal%22)%7C%7Cinvalid(%22filter%22,%22none%22)%7C%7Cinvalid(%22perspective%22,%22none%22)%7C%7Cs%5B%22isolation%22%5D===%22isolate%22%7C%7Cs.position===%22fixed%22%7C%7Cs.webkitOverflowScrolling===%22touch%22)%7Breturn%20true%7Del=el.parentElement%7Dreturn%20false%7Dfunction%20findNearestDialog(el)%7Bwhile(el)%7Bif(el.localName===%22dialog%22)%7Breturn%20el%7Del=el.parentElement%7Dreturn%20null%7Dfunction%20safeBlur(el)%7Bif(el&&el.blur&&el!==document.body)%7Bel.blur()%7D%7Dfunction%20inNodeList(nodeList,node)%7Bfor(var%20i=0;i%3CnodeList.length;++i)%7Bif(nodeList%5Bi%5D===node)%7Breturn%20true%7D%7Dreturn%20false%7Dfunction%20isFormMethodDialog(el)%7Bif(!el%7C%7C!el.hasAttribute(%22method%22))%7Breturn%20false%7Dreturn%20el.getAttribute(%22method%22).toLowerCase()===%22dialog%22%7Dfunction%20dialogPolyfillInfo(dialog)%7Bthis.dialog_=dialog;this.replacedStyleTop_=false;this.openAsModal_=false;if(!dialog.hasAttribute(%22role%22))%7Bdialog.setAttribute(%22role%22,%22dialog%22)%7Ddialog.show=this.show.bind(this);dialog.showModal=this.showModal.bind(this);dialog.close=this.close.bind(this);if(!(%22returnValue%22in%20dialog))%7Bdialog.returnValue=%22%22%7Dif(%22MutationObserver%22in%20window)%7Bvar%20mo=new%20MutationObserver(this.maybeHideModal.bind(this));mo.observe(dialog,%7Battributes:true,attributeFilter:%5B%22open%22%5D%7D)%7Delse%7Bvar%20removed=false;var%20cb=function()%7Bremoved?this.downgradeModal():this.maybeHideModal();removed=false%7D.bind(this);var%20timeout;var%20delayModel=function(ev)%7Bif(ev.target!==dialog)%7Breturn%7Dvar%20cand=%22DOMNodeRemoved%22;removed%7C=ev.type.substr(0,cand.length)===cand;window.clearTimeout(timeout);timeout=window.setTimeout(cb,0)%7D;%5B%22DOMAttrModified%22,%22DOMNodeRemoved%22,%22DOMNodeRemovedFromDocument%22%5D.forEach(function(name)%7Bdialog.addEventListener(name,delayModel)%7D)%7DObject.defineProperty(dialog,%22open%22,%7Bset:this.setOpen.bind(this),get:dialog.hasAttribute.bind(dialog,%22open%22)%7D);this.backdrop_=document.createElement(%22div%22);this.backdrop_.className=%22backdrop%22;this.backdrop_.addEventListener(%22click%22,this.backdropClick_.bind(this))%7DdialogPolyfillInfo.prototype=%7Bget%20dialog()%7Breturn%20this.dialog_%7D,maybeHideModal:function()%7Bif(this.dialog_.hasAttribute(%22open%22)&&document.body.contains(this.dialog_))%7Breturn%7Dthis.downgradeModal()%7D,downgradeModal:function()%7Bif(!this.openAsModal_)%7Breturn%7Dthis.openAsModal_=false;this.dialog_.style.zIndex=%22%22;if(this.replacedStyleTop_)%7Bthis.dialog_.style.top=%22%22;this.replacedStyleTop_=false%7Dthis.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_);dialogPolyfill.dm.removeDialog(this)%7D,setOpen:function(value)%7Bif(value)%7Bthis.dialog_.hasAttribute(%22open%22)%7C%7Cthis.dialog_.setAttribute(%22open%22,%22%22)%7Delse%7Bthis.dialog_.removeAttribute(%22open%22);this.maybeHideModal()%7D%7D,backdropClick_:function(e)%7Bif(!this.dialog_.hasAttribute(%22tabindex%22))%7Bvar%20fake=document.createElement(%22div%22);this.dialog_.insertBefore(fake,this.dialog_.firstChild);fake.tabIndex=-1;fake.focus();this.dialog_.removeChild(fake)%7Delse%7Bthis.dialog_.focus()%7Dvar%20redirectedEvent=document.createEvent(%22MouseEvents%22);redirectedEvent.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget);this.dialog_.dispatchEvent(redirectedEvent);e.stopPropagation()%7D,focus_:function()%7Bvar%20target=this.dialog_.querySelector(%22%5Bautofocus%5D:not(%5Bdisabled%5D)%22);if(!target&&this.dialog_.tabIndex%3E=0)%7Btarget=this.dialog_%7Dif(!target)%7Bvar%20opts=%5B%22button%22,%22input%22,%22keygen%22,%22select%22,%22textarea%22%5D;var%20query=opts.map(function(el)%7Breturn%20el+%22:not(%5Bdisabled%5D)%22%7D);query.push('%5Btabindex%5D:not(%5Bdisabled%5D):not(%5Btabindex=%22%22%5D)');target=this.dialog_.querySelector(query.join(%22,%20%22))%7DsafeBlur(document.activeElement);target&&target.focus()%7D,updateZIndex:function(dialogZ,backdropZ)%7Bif(dialogZ%3CbackdropZ)%7Bthrow%20new%20Error(%22dialogZ%20should%20never%20be%20%3C%20backdropZ%22)%7Dthis.dialog_.style.zIndex=dialogZ;this.backdrop_.style.zIndex=backdropZ%7D,show:function()%7Bif(!this.dialog_.open)%7Bthis.setOpen(true);this.focus_()%7D%7D,showModal:function()%7Bif(this.dialog_.hasAttribute(%22open%22))%7Bthrow%20new%20Error(%22Failed%20to%20execute%20'showModal'%20on%20dialog:%20The%20element%20is%20already%20open,%20and%20therefore%20cannot%20be%20opened%20modally.%22)%7Dif(!document.body.contains(this.dialog_))%7Bthrow%20new%20Error(%22Failed%20to%20execute%20'showModal'%20on%20dialog:%20The%20element%20is%20not%20in%20a%20Document.%22)%7Dif(!dialogPolyfill.dm.pushDialog(this))%7Bthrow%20new%20Error(%22Failed%20to%20execute%20'showModal'%20on%20dialog:%20There%20are%20too%20many%20open%20modal%20dialogs.%22)%7Dif(createsStackingContext(this.dialog_.parentElement))%7Bconsole.warn(%22A%20dialog%20is%20being%20shown%20inside%20a%20stacking%20context.%20%22+%22This%20may%20cause%20it%20to%20be%20unusable.%20For%20more%20information,%20see%20this%20link:%20%22+%22https://github.com/GoogleChrome/dialog-polyfill/#stacking-context%22)%7Dthis.setOpen(true);this.openAsModal_=true;if(dialogPolyfill.needsCentering(this.dialog_))%7BdialogPolyfill.reposition(this.dialog_);this.replacedStyleTop_=true%7Delse%7Bthis.replacedStyleTop_=false%7Dthis.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling);this.focus_()%7D,close:function(opt_returnValue)%7Bif(!this.dialog_.hasAttribute(%22open%22))%7Bthrow%20new%20Error(%22Failed%20to%20execute%20'close'%20on%20dialog:%20The%20element%20does%20not%20have%20an%20'open'%20attribute,%20and%20therefore%20cannot%20be%20closed.%22)%7Dthis.setOpen(false);if(opt_returnValue!==undefined)%7Bthis.dialog_.returnValue=opt_returnValue%7Dvar%20closeEvent=new%20supportCustomEvent(%22close%22,%7Bbubbles:false,cancelable:false%7D);this.dialog_.dispatchEvent(closeEvent)%7D%7D;var%20dialogPolyfill=%7B%7D;dialogPolyfill.reposition=function(element)%7Bvar%20scrollTop=document.body.scrollTop%7C%7Cdocument.documentElement.scrollTop;var%20topValue=scrollTop+(window.innerHeight-element.offsetHeight)/2;element.style.top=Math.max(scrollTop,topValue)+%22px%22%7D;dialogPolyfill.isInlinePositionSetByStylesheet=function(element)%7Bfor(var%20i=0;i%3Cdocument.styleSheets.length;++i)%7Bvar%20styleSheet=document.styleSheets%5Bi%5D;var%20cssRules=null;try%7BcssRules=styleSheet.cssRules%7Dcatch(e)%7B%7Dif(!cssRules)%7Bcontinue%7Dfor(var%20j=0;j%3CcssRules.length;++j)%7Bvar%20rule=cssRules%5Bj%5D;var%20selectedNodes=null;try%7BselectedNodes=document.querySelectorAll(rule.selectorText)%7Dcatch(e)%7B%7Dif(!selectedNodes%7C%7C!inNodeList(selectedNodes,element))%7Bcontinue%7Dvar%20cssTop=rule.style.getPropertyValue(%22top%22);var%20cssBottom=rule.style.getPropertyValue(%22bottom%22);if(cssTop&&cssTop!==%22auto%22%7C%7CcssBottom&&cssBottom!==%22auto%22)%7Breturn%20true%7D%7D%7Dreturn%20false%7D;dialogPolyfill.needsCentering=function(dialog)%7Bvar%20computedStyle=window.getComputedStyle(dialog);if(computedStyle.position!==%22absolute%22)%7Breturn%20false%7Dif(dialog.style.top!==%22auto%22&&dialog.style.top!==%22%22%7C%7Cdialog.style.bottom!==%22auto%22&&dialog.style.bottom!==%22%22)%7Breturn%20false%7Dreturn!dialogPolyfill.isInlinePositionSetByStylesheet(dialog)%7D;dialogPolyfill.forceRegisterDialog=function(element)%7Bif(window.HTMLDialogElement%7C%7Celement.showModal)%7Bconsole.warn(%22This%20browser%20already%20supports%20%3Cdialog%3E,%20the%20polyfill%20%22+%22may%20not%20work%20correctly%22,element)%7Dif(element.localName!==%22dialog%22)%7Bthrow%20new%20Error(%22Failed%20to%20register%20dialog:%20The%20element%20is%20not%20a%20dialog.%22)%7Dnew%20dialogPolyfillInfo(element)%7D;dialogPolyfill.registerDialog=function(element)%7Bif(!element.showModal)%7BdialogPolyfill.forceRegisterDialog(element)%7D%7D;dialogPolyfill.DialogManager=function()%7Bthis.pendingDialogStack=%5B%5D;var%20checkDOM=this.checkDOM_.bind(this);this.overlay=document.createElement(%22div%22);this.overlay.className=%22_dialog_overlay%22;this.overlay.addEventListener(%22click%22,function(e)%7Bthis.forwardTab_=undefined;e.stopPropagation();checkDOM(%5B%5D)%7D.bind(this));this.handleKey_=this.handleKey_.bind(this);this.handleFocus_=this.handleFocus_.bind(this);this.zIndexLow_=1e5;this.zIndexHigh_=1e5+150;this.forwardTab_=undefined;if(%22MutationObserver%22in%20window)%7Bthis.mo_=new%20MutationObserver(function(records)%7Bvar%20removed=%5B%5D;records.forEach(function(rec)%7Bfor(var%20i=0,c;c=rec.removedNodes%5Bi%5D;++i)%7Bif(!(c%20instanceof%20Element))%7Bcontinue%7Delse%20if(c.localName===%22dialog%22)%7Bremoved.push(c)%7Dremoved=removed.concat(c.querySelectorAll(%22dialog%22))%7D%7D);removed.length&&checkDOM(removed)%7D)%7D%7D;dialogPolyfill.DialogManager.prototype.blockDocument=function()%7Bdocument.documentElement.addEventListener(%22focus%22,this.handleFocus_,true);document.addEventListener(%22keydown%22,this.handleKey_);this.mo_&&this.mo_.observe(document,%7BchildList:true,subtree:true%7D)%7D;dialogPolyfill.DialogManager.prototype.unblockDocument=function()%7Bdocument.documentElement.removeEventListener(%22focus%22,this.handleFocus_,true);document.removeEventListener(%22keydown%22,this.handleKey_);this.mo_&&this.mo_.disconnect()%7D;dialogPolyfill.DialogManager.prototype.updateStacking=function()%7Bvar%20zIndex=this.zIndexHigh_;for(var%20i=0,dpi;dpi=this.pendingDialogStack%5Bi%5D;++i)%7Bdpi.updateZIndex(--zIndex,--zIndex);if(i===0)%7Bthis.overlay.style.zIndex=--zIndex%7D%7Dvar%20last=this.pendingDialogStack%5B0%5D;if(last)%7Bvar%20p=last.dialog.parentNode%7C%7Cdocument.body;p.appendChild(this.overlay)%7Delse%20if(this.overlay.parentNode)%7Bthis.overlay.parentNode.removeChild(this.overlay)%7D%7D;dialogPolyfill.DialogManager.prototype.containedByTopDialog_=function(candidate)%7Bwhile(candidate=findNearestDialog(candidate))%7Bfor(var%20i=0,dpi;dpi=this.pendingDialogStack%5Bi%5D;++i)%7Bif(dpi.dialog===candidate)%7Breturn%20i===0%7D%7Dcandidate=candidate.parentElement%7Dreturn%20false%7D;dialogPolyfill.DialogManager.prototype.handleFocus_=function(event)%7Bif(this.containedByTopDialog_(event.target))%7Breturn%7Devent.preventDefault();event.stopPropagation();safeBlur(event.target);if(this.forwardTab_===undefined)%7Breturn%7Dvar%20dpi=this.pendingDialogStack%5B0%5D;var%20dialog=dpi.dialog;var%20position=dialog.compareDocumentPosition(event.target);if(position&Node.DOCUMENT_POSITION_PRECEDING)%7Bif(this.forwardTab_)%7Bdpi.focus_()%7Delse%7Bdocument.documentElement.focus()%7D%7Delse%7B%7Dreturn%20false%7D;dialogPolyfill.DialogManager.prototype.handleKey_=function(event)%7Bthis.forwardTab_=undefined;if(event.keyCode===27)%7Bevent.preventDefault();event.stopPropagation();var%20cancelEvent=new%20supportCustomEvent(%22cancel%22,%7Bbubbles:false,cancelable:true%7D);var%20dpi=this.pendingDialogStack%5B0%5D;if(dpi&&dpi.dialog.dispatchEvent(cancelEvent))%7Bdpi.dialog.close()%7D%7Delse%20if(event.keyCode===9)%7Bthis.forwardTab_=!event.shiftKey%7D%7D;dialogPolyfill.DialogManager.prototype.checkDOM_=function(removed)%7Bvar%20clone=this.pendingDialogStack.slice();clone.forEach(function(dpi)%7Bif(removed.indexOf(dpi.dialog)!==-1)%7Bdpi.downgradeModal()%7Delse%7Bdpi.maybeHideModal()%7D%7D)%7D;dialogPolyfill.DialogManager.prototype.pushDialog=function(dpi)%7Bvar%20allowed=(this.zIndexHigh_-this.zIndexLow_)/2-1;if(this.pendingDialogStack.length%3E=allowed)%7Breturn%20false%7Dif(this.pendingDialogStack.unshift(dpi)===1)%7Bthis.blockDocument()%7Dthis.updateStacking();return%20true%7D;dialogPolyfill.DialogManager.prototype.removeDialog=function(dpi)%7Bvar%20index=this.pendingDialogStack.indexOf(dpi);if(index===-1)%7Breturn%7Dthis.pendingDialogStack.splice(index,1);if(this.pendingDialogStack.length===0)%7Bthis.unblockDocument()%7Dthis.updateStacking()%7D;dialogPolyfill.dm=new%20dialogPolyfill.DialogManager;dialogPolyfill.formSubmitter=null;dialogPolyfill.useValue=null;if(window.HTMLDialogElement===undefined)%7Bvar%20testForm=document.createElement(%22form%22);testForm.setAttribute(%22method%22,%22dialog%22);if(testForm.method!==%22dialog%22)%7Bvar%20methodDescriptor=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,%22method%22);if(methodDescriptor)%7Bvar%20realGet=methodDescriptor.get;methodDescriptor.get=function()%7Bif(isFormMethodDialog(this))%7Breturn%22dialog%22%7Dreturn%20realGet.call(this)%7D;var%20realSet=methodDescriptor.set;methodDescriptor.set=function(v)%7Bif(typeof%20v===%22string%22&&v.toLowerCase()===%22dialog%22)%7Breturn%20this.setAttribute(%22method%22,v)%7Dreturn%20realSet.call(this,v)%7D;Object.defineProperty(HTMLFormElement.prototype,%22method%22,methodDescriptor)%7D%7Ddocument.addEventListener(%22click%22,function(ev)%7BdialogPolyfill.formSubmitter=null;dialogPolyfill.useValue=null;if(ev.defaultPrevented)%7Breturn%7Dvar%20target=ev.target;if(!target%7C%7C!isFormMethodDialog(target.form))%7Breturn%7Dvar%20valid=target.type===%22submit%22&&%5B%22button%22,%22input%22%5D.indexOf(target.localName)%3E-1;if(!valid)%7Bif(!(target.localName===%22input%22&&target.type===%22image%22))%7Breturn%7DdialogPolyfill.useValue=ev.offsetX+%22,%22+ev.offsetY%7Dvar%20dialog=findNearestDialog(target);if(!dialog)%7Breturn%7DdialogPolyfill.formSubmitter=target%7D,false);var%20nativeFormSubmit=HTMLFormElement.prototype.submit;function%20replacementFormSubmit()%7Bif(!isFormMethodDialog(this))%7Breturn%20nativeFormSubmit.call(this)%7Dvar%20dialog=findNearestDialog(this);dialog&&dialog.close()%7DHTMLFormElement.prototype.submit=replacementFormSubmit;document.addEventListener(%22submit%22,function(ev)%7Bvar%20form=ev.target;if(!isFormMethodDialog(form))%7Breturn%7Dev.preventDefault();var%20dialog=findNearestDialog(form);if(!dialog)%7Breturn%7Dvar%20s=dialogPolyfill.formSubmitter;if(s&&s.form===form)%7Bdialog.close(dialogPolyfill.useValue%7C%7Cs.value)%7Delse%7Bdialog.close()%7DdialogPolyfill.formSubmitter=null%7D,true)%7DdialogPolyfill%5B%22forceRegisterDialog%22%5D=dialogPolyfill.forceRegisterDialog;dialogPolyfill%5B%22registerDialog%22%5D=dialogPolyfill.registerDialog;if(typeof%20define===%22function%22&&%22amd%22in%20define)%7Bdefine(function()%7Breturn%20dialogPolyfill%7D)%7Delse%20if(typeof%20module===%22object%22&&typeof%20module%5B%22exports%22%5D===%22object%22)%7Bmodule%5B%22exports%22%5D=dialogPolyfill%7Delse%7Bwindow%5B%22dialogPolyfill%22%5D=dialogPolyfill%7D%7D)()%7D,%7B%7D%5D,7:%5Bfunction(require,module,exports)%7Bvar%20aria=require(%22aria-api%22);var%20dialogPolyfill=require(%22dialog-polyfill%22);var%20treeview=require(%22./treeview%22);var%20DIALOG_ID=%22a11y-outline%22;var%20focus=function(el)%7Bel.focus();if(document.activeElement!==el)%7Bel.tabIndex=-1;el.focus()%7D%7D;var%20createDialog=function()%7Bvar%20dialog=document.createElement(%22dialog%22);dialog.id=DIALOG_ID;dialog.addEventListener(%22close%22,function()%7Bdialog.remove()%7D);document.body.appendChild(dialog);if(!dialog.showModal)%7BdialogPolyfill.registerDialog(dialog)%7Dreturn%20dialog%7D;var%20createItem=function(el,i)%7Bvar%20label=aria.getAttribute(el,%22roledescription%22)%7C%7Caria.getRole(el);if(aria.matches(el,%22heading%22))%7Blabel+=%22%20%22+aria.getAttribute(el,%22level%22)%7Dvar%20name=aria.getName(el,null,true);if(name)%7Blabel=name+%22%20%22+label%7Dreturn%7Blabel:label,href:%22#%22+i,children:%5B%5D,element:el%7D%7D;var%20insertItem=function(item,list)%7Bvar%20itemLevel=aria.getAttribute(item.element,%22level%22);var%20last=list%5Blist.length-1%5D;if(last)%7Bif(itemLevel%3Earia.getAttribute(last.element,%22level%22)%7C%7Clast.element.contains(item.element))%7Breturn%20insertItem(item,last.children)%7D%7Dlist.push(item)%7D;var%20buildTree=function(role,dialog)%7Bvar%20matches=aria.querySelectorAll(document,role).filter(function(el)%7Breturn!aria.matches(el,%22:hidden%22)%7D);var%20items=%5B%5D;for(var%20i=0;i%3Cmatches.length;i++)%7BinsertItem(createItem(matches%5Bi%5D,i),items)%7Dvar%20tree=treeview(items,dialog.id+%22-%22+role);tree.addEventListener(%22click%22,function(event)%7Bif(event.target.matches(%22a%22))%7Bevent.preventDefault();dialog.close();var%20href=event.target.getAttribute(%22href%22);var%20i=parseInt(href.substr(1),10);var%20el=matches%5Bi%5D;focus(el)%7D%7D);dialog.appendChild(tree)%7D;var%20updateVisiblePane=function(select,dialog)%7Bvar%20id=dialog.id+%22-%22+select.value;if(!document.getElementById(id))%7BbuildTree(select.value,dialog)%7Dvar%20trees=aria.querySelectorAll(dialog,%22tree%22);Array.prototype.forEach.call(trees,function(tree)%7Btree.hidden=tree.id!==id%7D)%7D;var%20quickNav=function()%7Bvar%20dialog=createDialog();var%20select=document.createElement(%22select%22);select.innerHTML='%3Coption%20value=%22landmark%22%3ELandmarks%3C/option%3E'+'%3Coption%20value=%22heading%22%3EHeadings%3C/option%3E'+'%3Coption%20value=%22link%22%3ELinks%3C/option%3E';select.addEventListener(%22change%22,function(event)%7BupdateVisiblePane(select,dialog)%7D);dialog.appendChild(select);var%20style=document.createElement(%22link%22);style.rel=%22stylesheet%22;style.href=%22https://xi.github.io/a11y-outline/outline.css%22;dialog.appendChild(style);updateVisiblePane(select,dialog);dialog.showModal()%7D;quickNav()%7D,%7B%22./treeview%22:8,%22aria-api%22:1,%22dialog-polyfill%22:6%7D%5D,8:%5Bfunction(require,module,exports)%7Bvar%20indexOf=function(list,item)%7Breturn%20Array.prototype.indexOf.call(list,item)%7D;var%20typeaheadString=%22%22;var%20typeaheadTimeout=null;var%20typeahead=function(c)%7BtypeaheadString+=c;clearTimeout(typeaheadTimeout);typeaheadTimeout=setTimeout(function()%7BtypeaheadString=%22%22%7D,400);return%20typeaheadString%7D;var%20activate=function(item)%7Bif(item)%7Bvar%20tree=item.closest('%5Brole=%22tree%22%5D');tree.setAttribute(%22aria-activedescendant%22,item.id);if(item.scrollIntoViewIfNeeded)%7Bitem.scrollIntoViewIfNeeded()%7Dvar%20old=tree.querySelector('%5Baria-selected=%22true%22%5D');if(old)%7Bold.setAttribute(%22aria-selected%22,false)%7Ditem.setAttribute(%22aria-selected%22,true)%7D%7D;var%20toggleGroup=function(item)%7Bvar%20expanded=item.getAttribute(%22aria-expanded%22)===%22true%22;item.setAttribute(%22aria-expanded%22,!expanded)%7D;var%20nextItem=function(item,direction,query)%7Bvar%20next;if(direction===%22parent%22)%7Bif(item.parentElement.getAttribute(%22role%22)===%22group%22)%7Bnext=item.parentElement.parentElement%7D%7Delse%7Bvar%20tree=item.closest('%5Brole=%22tree%22%5D');var%20items=tree.querySelectorAll('%5Brole=%22treeitem%22%5D');var%20hidden=tree.querySelectorAll('%5Baria-expanded=%22false%22%5D%20%5Brole=%22treeitem%22%5D');var%20i=indexOf(items,item);if(direction===%22start%22)i=-1;if(direction===%22end%22)i=items.length;var%20dir=direction===%22up%22%7C%7Cdirection===%22end%22?-1:1;if(!query)%7Bi+=dir%7Dwhile(i%3E=0&&i%3Citems.length)%7Bif(indexOf(hidden,items%5Bi%5D)===-1)%7Bif(!query%7C%7Cquery.test(items%5Bi%5D.textContent))%7Bnext=items%5Bi%5D;break%7D%7Di+=dir%7D%7Dactivate(next)%7D;var%20onKeyDown=function(event)%7Bif(!(event.shiftKey%7C%7Cevent.ctrlKey%7C%7Cevent.altKey%7C%7Cevent.metaKey))%7Bvar%20item=this.querySelector('%5Baria-selected=%22true%22%5D');switch(event.key)%7Bcase%22End%22:event.preventDefault();nextItem(item,%22end%22);break;case%22Home%22:event.preventDefault();nextItem(item,%22start%22);break;case%22ArrowUp%22:event.preventDefault();nextItem(item,%22up%22);break;case%22ArrowDown%22:event.preventDefault();nextItem(item,%22down%22);break;case%22ArrowLeft%22:event.preventDefault();if(item.getAttribute(%22aria-expanded%22)===%22true%22)%7BtoggleGroup(item)%7Delse%7BnextItem(item,%22parent%22)%7Dbreak;case%22ArrowRight%22:event.preventDefault();if(item.getAttribute(%22aria-expanded%22)===%22true%22)%7BnextItem(item,%22down%22)%7Delse%20if(item.hasAttribute(%22aria-expanded%22))%7BtoggleGroup(item)%7Dbreak;case%22Enter%22:var%20link=item.querySelector(%22a%22);link.click();break;default:if(event.key.length===1)%7Bvar%20s=typeahead(event.key);var%20r=new%20RegExp(%22%5E%22+s,%22i%22);nextItem(item,%22down%22,r)%7D%7D%7D%7D;var%20buildToggle=function()%7Bvar%20toggle=document.createElement(%22button%22);toggle.setAttribute(%22aria-hidden%22,true);toggle.tabIndex=-1;toggle.addEventListener(%22click%22,function(event)%7Bevent.preventDefault();var%20item=this.parentElement;toggleGroup(item)%7D);return%20toggle%7D;var%20buildLink=function(data,id)%7Bvar%20link=document.createElement(%22a%22);link.setAttribute(%22role%22,%22presentation%22);link.tabIndex=-1;link.id=id+%22-link%22;link.textContent=data.label;link.href=data.href;return%20link%7D;var%20buildItem=function(data,id)%7Bvar%20item=document.createElement(%22li%22);item.setAttribute(%22role%22,%22treeitem%22);item.id=id;item.setAttribute(%22aria-labelledby%22,id+%22-link%22);item.setAttribute(%22aria-selected%22,false);item.appendChild(buildLink(data,id));if(data.children&&data.children.length)%7Bitem.setAttribute(%22aria-expanded%22,true);item.appendChild(buildToggle());item.appendChild(buildGroup(data.children,id))%7Dreturn%20item%7D;var%20buildList=function(data,id)%7Bvar%20list=document.createElement(%22ul%22);data.forEach(function(child,i)%7Bvar%20item=buildItem(child,id+%22.%22+i);list.appendChild(item)%7D);return%20list%7D;var%20buildGroup=function(data,id)%7Bvar%20group=buildList(data,id);group.setAttribute(%22role%22,%22group%22);return%20group%7D;var%20buildTree=function(data,id)%7Bvar%20tree=buildList(data,id);tree.setAttribute(%22role%22,%22tree%22);tree.tabIndex=0;tree.id=id;tree.className=%22treeview%22;tree.addEventListener(%22keydown%22,onKeyDown);tree.addEventListener(%22click%22,function(event)%7Bvar%20item=event.target;if(!item.matches('%5Brole=%22treeitem%22%5D'))%7Bitem=item.closest('%5Brole=%22treeitem%22%5D')%7Dactivate(item);this.focus()%7D);var%20first=tree.querySelector('%5Brole=%22treeitem%22%5D');activate(first);return%20tree%7D;module.exports=buildTree%7D,%7B%7D%5D%7D,%7B%7D,%5B7%5D);})()