File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -369,6 +369,7 @@ export function ExplorerMathDocumentMixin<
369369 brailleCombine : false , // combine Braille with speech output
370370 help : true , // include "press h for help" messages on focus
371371 roleDescription : 'math' , // the role description to use for math expressions
372+ inTabOrder : true , // true if expressin get tabindex = 0
372373 tabSelects : 'all' , // 'all' for whole expression, 'last' for last explored node
373374 }
374375 } ;
Original file line number Diff line number Diff line change @@ -1277,7 +1277,7 @@ export class SpeechExplorer
12771277 if ( this . img ) {
12781278 this . node . append ( this . img ) ;
12791279 }
1280- this . node . setAttribute ( 'tabindex' , '0' ) ;
1280+ this . node . setAttribute ( 'tabindex' , this . tabIndex ) ;
12811281 }
12821282 }
12831283
@@ -1903,13 +1903,20 @@ export class SpeechExplorer
19031903 this . magnifyRegion . Update ( this . current ) ;
19041904 }
19051905
1906+ /**
1907+ * @returns {string } The tabIndex to use when not exploring
1908+ */
1909+ protected get tabIndex ( ) : string {
1910+ return this . document . options . a11y . inTabOrder ? '0' : '-1' ;
1911+ }
1912+
19061913 /**
19071914 * @override
19081915 */
19091916 public Attach ( ) {
19101917 if ( this . attached ) return ;
19111918 super . Attach ( ) ;
1912- this . node . setAttribute ( 'tabindex' , '0' ) ;
1919+ this . node . setAttribute ( 'tabindex' , this . tabIndex ) ;
19131920 this . attached = true ;
19141921 }
19151922
@@ -1923,7 +1930,7 @@ export class SpeechExplorer
19231930 this . node . removeAttribute ( 'aria-label' ) ;
19241931 this . img ?. remove ( ) ;
19251932 if ( this . active ) {
1926- this . node . setAttribute ( 'tabindex' , '0' ) ;
1933+ this . node . setAttribute ( 'tabindex' , this . tabIndex ) ;
19271934 }
19281935 this . attached = false ;
19291936 }
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export interface MenuSettings {
8484 autocollapse : boolean ;
8585 collapsible : boolean ;
8686 enrich : boolean ;
87- inTabOrder : boolean ;
8887 assistiveMml : boolean ;
8988 // A11y settings
9089 backgroundColor : string ;
@@ -99,6 +98,7 @@ export interface MenuSettings {
9998 infoPrefix : boolean ;
10099 infoRole : boolean ;
101100 infoType : boolean ;
101+ inTabOrder : boolean ;
102102 locale : string ;
103103 magnification : string ;
104104 magnify : string ;
@@ -153,7 +153,6 @@ export class Menu {
153153 autocollapse : false ,
154154 collapsible : false ,
155155 enrich : true ,
156- inTabOrder : true ,
157156 assistiveMml : false ,
158157 speech : true ,
159158 braille : true ,
@@ -162,6 +161,7 @@ export class Menu {
162161 brailleCombine : false ,
163162 speechRules : 'clearspeak-default' ,
164163 roleDescription : 'math' ,
164+ inTabOrder : true ,
165165 tabSelects : 'all' ,
166166 help : true ,
167167 } ,
@@ -669,7 +669,7 @@ export class Menu {
669669 this . variable < boolean > ( 'enrich' , ( enrich ) =>
670670 this . setEnrichment ( enrich )
671671 ) ,
672- this . variable < boolean > ( 'inTabOrder' , ( tab ) => this . setTabOrder ( tab ) ) ,
672+ this . a11yVar < boolean > ( 'inTabOrder' , ( tab ) => this . setTabOrder ( tab ) ) ,
673673 this . a11yVar < string > ( 'tabSelects' ) ,
674674 this . variable < boolean > ( 'assistiveMml' , ( mml ) =>
675675 this . setAssistiveMml ( mml )
You can’t perform that action at this time.
0 commit comments