mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 10:45:51 +03:00
Accessibility focus checkboxes and radio boxes
This commit is contained in:
parent
749aaf0b54
commit
fb953ade8e
3 changed files with 25 additions and 0 deletions
|
@ -692,3 +692,15 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
|
|||
border-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@define-mixin unreal-focus {
|
||||
outline-width: 2px;
|
||||
outline-style: solid;
|
||||
outline-color: Highlight;
|
||||
|
||||
/* WebKit gets its native focus styles. */
|
||||
@media (-webkit-min-device-pixel-ratio: 0) {
|
||||
outline-color: -webkit-focus-ring-color;
|
||||
outline-style: auto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,5 +80,11 @@ limitations under the License.
|
|||
background-color: $accent-color;
|
||||
border-color: $accent-color;
|
||||
}
|
||||
|
||||
&.focus-visible {
|
||||
& + label .mx_Checkbox_background {
|
||||
@mixin unreal-focus;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ limitations under the License.
|
|||
box-sizing: border-box;
|
||||
height: $font-16px;
|
||||
width: $font-16px;
|
||||
margin-left: 1px; // For the highlight on focus
|
||||
|
||||
border: $font-1-5px solid $radio-circle-color;
|
||||
border-radius: $font-16px;
|
||||
|
@ -77,6 +78,12 @@ limitations under the License.
|
|||
}
|
||||
}
|
||||
|
||||
&.focus-visible {
|
||||
& + div {
|
||||
@mixin unreal-focus;
|
||||
}
|
||||
}
|
||||
|
||||
&:checked {
|
||||
& + div {
|
||||
border-color: $active-radio-circle-color;
|
||||
|
|
Loading…
Reference in a new issue