11/* ========================================================================
2- * Version: 5.8.0
2+ * Version: 5.8.2
33 * Copyright (c) 2022, 2023, 2024, 2025 Jon Gunderson; Licensed BSD
44 * Copyright (c) 2021 PayPal Accessibility Team and University of Illinois; Licensed BSD
55 * All rights reserved.
4343 buttonTextDarkColor : '#ffffff' ,
4444 buttonBackgroundDarkColor : '#013c93' ,
4545 zIndex : '2000000' ,
46+ z2Index : '20000002' ,
4647 zHighlight : '1999900' ,
4748 displayOption : 'fixed' ,
4849 highlightTarget : 'instant' ,
327328 border: none;
328329 margin-bottom: 4px;
329330 transition: left 1s ease;
330- z-index: $zIndex !important;
331+ z-index: $z1Index !important;
331332 user-select: none;
332333 touch-action: none;
333334}
345346 z-index: 100000 !important;
346347 font-family: $fontFamily;
347348 font-size: $fontSize;
348- z-index: $zIndex !important;
349+ z-index: $z1Index !important;
349350 touch-action: none;
350351}
351352
413414 border-style: solid;
414415 border-color: light-dark($focusBorderColor, $focusBorderDarkColor);
415416 border-radius: 5px;
416- z-index: $zIndex !important;
417+ z-index: $z1Index !important;
417418 touch-action: none;
418419}
419420
444445 grid-template-columns: repeat(6, 1.2rem) 1fr;
445446 grid-column-gap: 2px;
446447 font-size: 1em;
447- z-index: $zIndex !important;
448+ z-index: $z1Index;
448449}
449450
451+ #${ SKIP_TO_ID } [role="menuitem"].shortcuts,
452+ #${ SKIP_TO_ID } [role="menuitem"].about {
453+ z-index: $z2Index;
454+ }
455+
456+
450457#${ SKIP_TO_ID } [role="menuitem"] .level,
451458#${ SKIP_TO_ID } [role="menuitem"] .label {
452459 font-size: 100%;
526533 border-bottom-color: light-dark($menuTextColor, $menuTextDarkColor);
527534 background-color: light-dark($menuBackgroundColor, $menuBackgroundColor);
528535 color: light-dark($menuTextColor, $menuTextDarkColor);
529- z-index: $zIndex !important;
536+ z-index: $z1Index !important;
530537}
531538
532539#${ SKIP_TO_ID } [role="separator"] .mofn {
615622 border-bottom-color: ButtonBorder;
616623 background-color: ButtonFace;
617624 color: ButtonText;
618- z-index: $zIndex !important;
625+ z-index: $z1Index !important;
619626 }
620627
621628 #${ SKIP_TO_ID } button:focus,
804811 cssMenu = updateStyle ( cssMenu , '$buttonBackgroundColor' , config . buttonBackgroundColor , theme . buttonBackgroundColor , defaultTheme . buttonBackgroundColor ) ;
805812 cssMenu = updateStyle ( cssMenu , '$buttonBackgroundDarkColor' , config . buttonBackgroundDarkColor , theme . buttonBackgroundDarkColor , defaultTheme . buttonBackgroundDarkColor ) ;
806813
807- cssMenu = updateStyle ( cssMenu , '$zIndex' , config . zIndex , theme . zIndex , defaultTheme . zIndex ) ;
814+ cssMenu = updateStyle ( cssMenu , '$z1Index' , config . zIndex , theme . zIndex , defaultTheme . zIndex ) ;
815+
816+ const z2Index = config . zIndex ?
817+ ( parseInt ( config . zIndex ) + 1 ) . toString ( ) :
818+ '2000002' ;
819+
820+ cssMenu = updateStyle ( cssMenu , '$z2Index' , z2Index , '' , defaultTheme . z2Index ) ;
808821
809822 // Special case for theme configuration used in Illinois theme
810823 if ( typeof theme . highlightTarget === 'string' ) {
@@ -957,7 +970,7 @@ dialog#skip-to-info-dialog {
957970 border-color: light-dark($focusBorderColor, $focusBorderDarkColor);
958971 border-radius: 5px;
959972 z-index: 2000001;
960-
973+ max-width: 350px;
961974}
962975
963976dialog#skip-to-info-dialog .header {
@@ -1001,16 +1014,27 @@ dialog#skip-to-info-dialog .content {
10011014}
10021015
10031016dialog#skip-to-info-dialog .content .desc {
1004- max-width: 20em;
1017+ margin: 0.25em;
1018+ text-align: center;
10051019}
10061020
1007- dialog#skip-to-info-dialog .content .happy {
1008- margin-top: 0.5em;
1021+ dialog#skip-to-info-dialog .content .privacy-label {
1022+ margin: 0;
1023+ margin-top: 1em;
10091024 text-align: center;
1010- font-family: fantasy, cursive;
1011- font-size: 1.25em;
10121025 font-weight: bold;
1013- font-style: italic;
1026+ }
1027+
1028+ dialog#skip-to-info-dialog .content .privacy {
1029+ text-align: center;
1030+ margin-bottom: 1em;
1031+ }
1032+
1033+
1034+ dialog#skip-to-info-dialog .content .happy {
1035+ text-align: center;
1036+ font-family: 'Brush Script MT', cursive;
1037+ font-size: 200%;
10141038 letter-spacing: 0.05em;
10151039}
10161040
@@ -1019,8 +1043,6 @@ dialog#skip-to-info-dialog .content .version,
10191043dialog#skip-to-info-dialog .content .copyright {
10201044 margin-top: 0.5em;
10211045 text-align: center;
1022- font-weight: bold;
1023- font-size: 90%;
10241046}
10251047
10261048dialog#skip-to-info-dialog .content table {
@@ -1358,9 +1380,20 @@ button:hover {
13581380
13591381 let divElem = document . createElement ( 'div' ) ;
13601382 divElem . className = 'desc' ;
1383+
13611384 divElem . textContent = config . aboutDesc ;
13621385 this . contentElem . appendChild ( divElem ) ;
13631386
1387+ divElem = document . createElement ( 'div' ) ;
1388+ divElem . className = 'privacy-label' ;
1389+ divElem . textContent = config . aboutPrivacyLabel ;
1390+ this . contentElem . appendChild ( divElem ) ;
1391+
1392+ divElem = document . createElement ( 'div' ) ;
1393+ divElem . className = 'privacy' ;
1394+ divElem . textContent = config . aboutPrivacy ;
1395+ this . contentElem . appendChild ( divElem ) ;
1396+
13641397 divElem = document . createElement ( 'div' ) ;
13651398 divElem . className = 'happy' ;
13661399 divElem . textContent = config . aboutHappy ;
@@ -4391,7 +4424,7 @@ button:hover {
43914424 const menuitemNode = document . createElement ( 'div' ) ;
43924425 menuitemNode . setAttribute ( 'role' , 'menuitem' ) ;
43934426 menuitemNode . setAttribute ( 'data-about-info' , '' ) ;
4394- menuitemNode . className = 'skip-to-nav skip-to-nesting-level-0' ;
4427+ menuitemNode . className = 'about skip-to-nav skip-to-nesting-level-0' ;
43954428 menuitemNode . tabIndex = - 1 ;
43964429
43974430 const labelNode = document . createElement ( 'span' ) ;
@@ -4528,30 +4561,15 @@ button:hover {
45284561 this . updateMenuitems ( ) ;
45294562
45304563 this . landmarkGroupLabelNode . textContent = this . addNumberToGroupLabel ( config . landmarkGroupLabel , landmarkElements . length ) ;
4531- if ( landmarkElements . length === 1 ) {
4532- this . landmarkGroupLabelNode . setAttribute ( 'aria-label' , config . landmarkOneGroupLabel ) ;
4533- }
4534- else {
4535- this . landmarkGroupLabelNode . setAttribute ( 'aria-label' , `${ landmarkElements . length } ${ config . landmarkGroupLabel } ` ) ;
4536- }
4564+ this . landmarkGroupLabelNode . setAttribute ( 'aria-label' , config . landmarkGroupLabel ) ;
45374565
45384566 if ( config . headings . includes ( 'main' ) ) {
45394567 this . headingGroupLabelNode . textContent = this . addNumberToGroupLabel ( config . headingMainGroupLabel , headingElements . length ) ;
4540- if ( headingElements . length === 1 ) {
4541- this . headingGroupLabelNode . setAttribute ( 'aria-label' , config . headingOneMainGroupLabel ) ;
4542- }
4543- else {
4544- this . headingGroupLabelNode . setAttribute ( 'aria-label' , `${ headingElements . length } ${ config . headingMainGroupLabel } ` ) ;
4545- }
4568+ this . headingGroupLabelNode . setAttribute ( 'aria-label' , config . headingMainGroupLabel ) ;
45464569 }
45474570 else {
45484571 this . headingGroupLabelNode . textContent = this . addNumberToGroupLabel ( config . headingGroupLabel , headingElements . length ) ;
4549- if ( headingElements . length === 1 ) {
4550- this . headingGroupLabelNode . setAttribute ( 'aria-label' , config . headingOneGroupLabel ) ;
4551- }
4552- else {
4553- this . headingGroupLabelNode . setAttribute ( 'aria-label' , `${ headingElements . length } ${ config . headingGroupLabel } ` ) ;
4554- }
4572+ this . headingGroupLabelNode . setAttribute ( 'aria-label' , config . headingGroupLabel ) ;
45554573 }
45564574 }
45574575
@@ -4848,7 +4866,7 @@ button:hover {
48484866 * @return {object } see @desc
48494867 */
48504868 getMenuitem ( x , y ) {
4851- for ( let i = 0 ; i < this . menuitemNodes . length ; i + = 1 ) {
4869+ for ( let i = ( this . menuitemNodes . length - 1 ) ; i >= 0 ; i - = 1 ) {
48524870 const node = this . menuitemNodes [ i ] ;
48534871 const rect = node . getBoundingClientRect ( ) ;
48544872
@@ -5256,6 +5274,7 @@ button:hover {
52565274 }
52575275
52585276 handleMenuitemClick ( event ) {
5277+ debug$2 . log ( `[handleMenuitemClick]: ${ event . currentTarget . textContent } ` ) ;
52595278 this . handleMenuitemAction ( event . currentTarget ) ;
52605279 event . stopPropagation ( ) ;
52615280 event . preventDefault ( ) ;
@@ -5291,7 +5310,6 @@ button:hover {
52915310 }
52925311
52935312 handleMenuitemPointerleave ( event ) {
5294- debug$2 . flag && debug$2 . log ( `[leave]` ) ;
52955313 let tgt = event . currentTarget ;
52965314 tgt . classList . remove ( 'hover' ) ;
52975315 event . stopPropagation ( ) ;
@@ -5406,7 +5424,7 @@ button:hover {
54065424 // Always call super first in constructor
54075425 super ( ) ;
54085426 this . attachShadow ( { mode : 'open' } ) ;
5409- this . version = "5.8.0 " ;
5427+ this . version = "5.8.2 " ;
54105428 this . buttonSkipTo = false ;
54115429 this . initialized = false ;
54125430
@@ -5469,7 +5487,9 @@ button:hover {
54695487 aboutHappy : `Happy Skipping!` ,
54705488 aboutVersion : `Version ${ this . version } ` ,
54715489 aboutCopyright : 'BSD License, Copyright 2021-2025' ,
5472- aboutDesc : 'SkipTo.js is a free and open source utility to support authors in implementing the WCAG 4.2.1 Bypass Block requirement on their websites.' ,
5490+ aboutDesc : 'SkipTo.js is a free and open source utility to support the WCAG 2.4.1 Bypass Block requirement. ' ,
5491+ aboutPrivacyLabel : 'Privacy' ,
5492+ aboutPrivacy : 'SkipTo.js does not collect or store any information about users or work with any other parties to collect or share user browsing information.' ,
54735493
54745494 closeLabel : 'Close' ,
54755495 moreInfoLabel : 'More Information' ,
@@ -5509,9 +5529,7 @@ button:hover {
55095529 menuLabel : 'Landmarks and Headings' ,
55105530 landmarkGroupLabel : 'Landmark Regions' ,
55115531 headingGroupLabel : 'Headings' ,
5512- headingOneGroupLabel : 'One Heading' ,
55135532 headingMainGroupLabel : 'Headings in Main Region' ,
5514- headingOneMainGroupLabel : 'One Heading in Main Region' ,
55155533 headingLevelLabel : 'Heading level' ,
55165534 mainLabel : 'main' ,
55175535 searchLabel : 'search' ,
0 commit comments