Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit bf9c2d3

Browse files
Improvements to and consistency in accessible hiding content. TODO: look into #3851 and create a mixin when using SASS.
1 parent 3191733 commit bf9c2d3

9 files changed

+74
-10
lines changed

css/structure/jquery.mobile.button.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ button.ui-btn-icon-notext {
5050
.ui-state-disabled input[type="button"],
5151
.ui-state-disabled input[type="submit"],
5252
.ui-state-disabled input[type="reset"] {
53-
position: absolute;
53+
position: absolute !important;
54+
top: -9999px;
5455
left: -9999px;
56+
height: 1px;
57+
width: 1px;
58+
overflow: hidden;
59+
clip: rect(1px 1px 1px 1px);
60+
clip: rect(1px,1px,1px,1px);
5561
}

css/structure/jquery.mobile.collapsible.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@
3333
border-top-width: 1px;
3434
}
3535
.ui-collapsible-heading-status {
36-
position: absolute;
36+
position: absolute !important;
3737
top: -9999px;
38-
left: 0;
38+
left: -9999px;
39+
height: 1px;
40+
width: 1px;
41+
overflow: hidden;
42+
clip: rect(1px 1px 1px 1px);
43+
clip: rect(1px,1px,1px,1px);
3944
}
4045
.ui-collapsible-content {
4146
display: block;

css/structure/jquery.mobile.controlgroup.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ fieldset.ui-controlgroup.ui-mini {
165165
font-size: 16px;
166166
}
167167
.ui-controlgroup-controls > label {
168-
position: absolute;
168+
position: absolute !important;
169+
top: -9999px;
169170
left: -9999px;
171+
height: 1px;
172+
width: 1px;
173+
overflow: hidden;
174+
clip: rect(1px 1px 1px 1px);
175+
clip: rect(1px,1px,1px,1px);
170176
}

css/structure/jquery.mobile.core.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,14 @@ div.ui-mobile-viewport {
6363

6464
/* Non-js content hiding */
6565
.ui-nojs {
66-
position: absolute;
66+
position: absolute !important;
67+
top: -9999px;
6768
left: -9999px;
69+
height: 1px;
70+
width: 1px;
71+
overflow: hidden;
72+
clip: rect(1px 1px 1px 1px);
73+
clip: rect(1px,1px,1px,1px);
6874
}
6975

7076
/* Loading screen */
@@ -372,7 +378,11 @@ label {
372378
.ui-hide-label .ui-rangeslider label,
373379
.ui-hidden-accessible {
374380
position: absolute !important;
381+
top: -9999px;
375382
left: -9999px;
383+
height: 1px;
384+
width: 1px;
385+
overflow: hidden;
376386
clip: rect(1px 1px 1px 1px);
377387
clip: rect(1px,1px,1px,1px);
378388
}

css/structure/jquery.mobile.fixedToolbar.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@
4343
}
4444
.ui-page-header-fullscreen .ui-fixed-hidden,
4545
.ui-page-footer-fullscreen .ui-fixed-hidden {
46+
position: absolute !important;
47+
top: -9999px;
4648
left: -9999px;
49+
height: 1px;
50+
width: 1px;
51+
overflow: hidden;
52+
clip: rect(1px 1px 1px 1px);
53+
clip: rect(1px,1px,1px,1px);
4754
}
4855
.ui-header-fixed .ui-btn,
4956
.ui-footer-fixed .ui-btn {

css/structure/jquery.mobile.forms.rangeslider.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ html >/**/body .ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track:
5454
/* Hide the second label (the first is moved outside the div) */
5555
div.ui-rangeslider label {
5656
position: absolute !important;
57+
top: -9999px;
5758
left: -9999px;
59+
height: 1px;
60+
width: 1px;
61+
overflow: hidden;
5862
clip: rect(1px 1px 1px 1px);
5963
clip: rect(1px,1px,1px,1px);
6064
}

css/structure/jquery.mobile.forms.select.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
position: relative;
44
}
55
.ui-select select {
6-
position: absolute;
6+
position: absolute !important;
7+
top: -9999px;
78
left: -9999px;
9+
height: 1px;
10+
width: 1px;
11+
overflow: hidden;
12+
clip: rect(1px 1px 1px 1px);
13+
clip: rect(1px,1px,1px,1px);
814
}
915
.ui-select .ui-btn {
1016
opacity: 1; /* Fixes #2588: When Windows Phone 7.5 (Mango) tries to calculate a numeric opacity for a select (including "inherit") without explicitly specifying an opacity on the parent to give it context, a bug appears where clicking elsewhere on the page after opening the select will open the select again. */

css/structure/jquery.mobile.forms.slider.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,14 @@ input.ui-slider-input {
7575
margin: -8px 0 0 -8px;
7676
}
7777
select.ui-slider-switch {
78-
position: absolute;
78+
position: absolute !important;
79+
top: -9999px;
7980
left: -9999px;
81+
height: 1px;
82+
width: 1px;
83+
overflow: hidden;
84+
clip: rect(1px 1px 1px 1px);
85+
clip: rect(1px,1px,1px,1px);
8086
}
8187
div.ui-slider-switch {
8288
display: inline-block;

css/structure/jquery.mobile.popup.css

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
.ui-popup {
3232
position: relative;
3333
}
34+
.ui-popup-hidden {
35+
position: absolute !important;
36+
top: -9999px;
37+
left: -9999px;
38+
height: 1px;
39+
width: 1px;
40+
overflow: hidden;
41+
clip: rect(1px 1px 1px 1px);
42+
clip: rect(1px,1px,1px,1px);
43+
visibility: hidden;
44+
}
3445
.ui-popup.ui-content,
3546
.ui-popup .ui-content {
3647
overflow: visible;
@@ -107,6 +118,9 @@
107118
margin: 0;
108119
z-index: 1101;
109120
}
110-
.ui-popup > .ui-btn-left { left: -9px; }
111-
.ui-popup > .ui-btn-right { right: -9px; }
112-
.ui-popup-hidden { top: -99999px; left: -9999px; visibility: hidden; }
121+
.ui-popup > .ui-btn-left {
122+
left: -9px;
123+
}
124+
.ui-popup > .ui-btn-right {
125+
right: -9px;
126+
}

0 commit comments

Comments
 (0)