Skip to content

Commit 75897a0

Browse files
authored
Merge pull request #1072 from mathjax/region-css
Make non-shown regions be display:none
2 parents ea39afb + 5ade084 commit 75897a0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

ts/a11y/explorer/Region.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ export class ToolTip extends StringRegion {
317317
protected static style: CssStyles =
318318
new CssStyles({
319319
['.' + ToolTip.className]: {
320-
position: 'absolute', display: 'inline-block',
321-
height: '1px', width: '1px'
320+
display: 'none',
322321
},
323322
['.' + ToolTip.className + '_Show']: {
324323
width: 'auto', height: 'auto', opacity: 1, 'text-align': 'center',
325-
'border-radius': '6px', padding: '0px 0px',
326-
'border-bottom': '1px dotted black', position: 'absolute',
324+
'border-radius': '6px', padding: 0,
325+
'border-bottom': '1px dotted black',
326+
position: 'absolute', display: 'inline-block',
327327
'z-index': 202
328328
}
329329
});
@@ -344,12 +344,12 @@ export class LiveRegion extends StringRegion {
344344
protected static style: CssStyles =
345345
new CssStyles({
346346
['.' + LiveRegion.className]: {
347-
position: 'absolute', top: '0', height: '1px', width: '1px',
348-
padding: '1px', overflow: 'hidden'
347+
display: 'none'
349348
},
350349
['.' + LiveRegion.className + '_Show']: {
351-
top: '0', position: 'absolute', width: 'auto', height: 'auto',
352-
padding: '0px 0px', opacity: 1, 'z-index': '202',
350+
position: 'absolute', top: 0,
351+
display: 'block', width: 'auto', height: 'auto',
352+
padding: 0, opacity: 1, 'z-index': '202',
353353
left: 0, right: 0, 'margin': '0 auto',
354354
'background-color': 'rgba(0, 0, 255, 0.2)', 'box-shadow': '0px 5px 20px #888',
355355
border: '2px solid #CCCCCC'
@@ -525,12 +525,12 @@ export class HoverRegion extends AbstractRegion<HTMLElement> {
525525
protected static style: CssStyles =
526526
new CssStyles({
527527
['.' + HoverRegion.className]: {
528-
position: 'absolute', height: '1px', width: '1px',
529-
padding: '1px', overflow: 'hidden'
528+
display: 'none'
530529
},
531530
['.' + HoverRegion.className + '_Show']: {
532-
position: 'absolute', width: 'max-content', height: 'auto',
533-
padding: '0px 0px', opacity: 1, 'z-index': '202', 'margin': '0 auto',
531+
display: 'block', position: 'absolute',
532+
width: 'max-content', height: 'auto',
533+
padding: 0, opacity: 1, 'z-index': '202', 'margin': '0 auto',
534534
'background-color': 'rgba(0, 0, 255, 0.2)',
535535
'box-shadow': '0px 10px 20px #888', border: '2px solid #CCCCCC'
536536
}

0 commit comments

Comments
 (0)