Skip to content

Commit 0e6ca50

Browse files
committed
Fixing aria-markup and keyboard accessibility/focus management for quality plugin.
* Adds aria-controls and aria-expanded status. * Rewrites EventListeners to handle showing/hiding the flyout with keyboard and mouse events. * Adding focus highlighting * Converting px to rem * Removing unnecessary CSS
1 parent b127f48 commit 0e6ca50

1 file changed

Lines changed: 25 additions & 17 deletions

File tree

src/quality/quality.css

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,28 @@
77
.mejs-qualities-button > button {
88
background: transparent;
99
color: #fff;
10-
font-size: 11px;
10+
font-size: 0.6875rem;
1111
font-weight: 700;
12-
line-height: normal;
13-
margin: 9px 0 0;
14-
width: 36px;
12+
margin: 0.563rem 0 0;
13+
width: 2.25rem;
1514
}
1615

1716
.mejs__qualities-selector,
1817
.mejs-qualities-selector {
1918
background: rgba(50, 50, 50, 0.7);
20-
border: solid 1px transparent;
19+
border: 0.063rem solid transparent;
2120
border-radius: 0;
22-
height: 100px;
23-
left: -10px;
21+
height: 6.25rem;
22+
left: -0.625rem;
2423
overflow: hidden;
2524
padding: 0;
2625
position: absolute;
27-
top: -100px;
28-
width: 60px;
26+
top: -6.25rem;
27+
width: 3.75rem;
28+
}
29+
30+
.mejs__qualities-selector:focus-within {
31+
border-color: #fff;
2932
}
3033

3134
.mejs__qualities-selector ul,
@@ -43,33 +46,38 @@
4346
cursor: pointer;
4447
display: block;
4548
list-style-type: none!important;
46-
margin: 0 0 6px;
4749
overflow: hidden;
48-
padding: 0 10px;
50+
padding: 0 0.625rem;
51+
border: 0.06rem solid transparent;
4952
}
53+
5054
.mejs__qualities-selector li:hover,
5155
.mejs-qualities-selector li:hover {
5256
background-color: rgba(255, 255, 255, 0.2);
5357
cursor: pointer;
5458
}
5559

60+
.mejs__qualities-selector li:focus-within,
61+
.mejs-qualities-selector li:focus-within {
62+
border-color: #fff;
63+
}
64+
5665
.mejs__qualities-selector input,
5766
.mejs-qualities-selector input {
5867
clear: both;
5968
float: left;
60-
left: -1000px;
61-
margin: 3px 3px 0 5px;
69+
left: -62.5rem;
70+
margin: 0.188rem 0.188rem 0 0.313rem;
6271
position: absolute;
6372
}
6473

6574
.mejs__qualities-selector label,
6675
.mejs-qualities-selector label {
6776
cursor: pointer;
6877
float: left;
69-
font-size: 10px;
70-
line-height: 15px;
71-
padding: 4px 0 0;
72-
width: 55px;
78+
font-size: 0.625rem;
79+
padding: 0.375rem 0;
80+
width: 3.438rem;
7381
}
7482

7583
.mejs__qualities-selected,

0 commit comments

Comments
 (0)