Merge pull request #1348 from aryanpingle/keyboard-a11y

Better Keyboard A11y + Navigation
This commit is contained in:
Adam Argyle
2023-04-12 09:11:16 -07:00
committed by GitHub
6 changed files with 73 additions and 3 deletions

View File

@ -2,6 +2,26 @@
display: inline-block;
position: relative;
--size: 17px;
&::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 200%;
height: 200%;
background-color: var(--main-theme-color);
border-radius: 999px;
opacity: 0.25;
transform: translate(-50%, -50%) scale(0);
transition-property: transform;
transition-duration: 250ms;
}
&:focus-within::before {
transform: translate(-50%, -50%) scale(1);
}
}
.real-checkbox {

View File

@ -47,6 +47,10 @@ range-input::before {
height: 12px;
}
range-input:focus-within .thumb {
outline: white solid 2px;
}
.thumb-wrapper {
position: absolute;
left: 6px;

View File

@ -11,6 +11,10 @@
padding: 3px calc(var(--thumb-size) / 2 + 3px);
}
.checkbox:focus-within .track {
outline: white solid 2px;
}
.thumb {
position: relative;
width: var(--thumb-size);

View File

@ -197,6 +197,12 @@ export default class Options extends Component<Props, State> {
}
title="Import saved side settings"
onClick={this.onImportSideSettingsClick}
disabled={
// Disabled if this side's settings haven't been saved
(!this.state.leftSideSettings &&
this.props.index === 0) ||
(!this.state.rightSideSettings && this.props.index === 1)
}
>
<ImportIcon />
</button>

View File

@ -53,6 +53,16 @@
composes: option-toggle;
grid-template-columns: auto 1fr;
gap: 1em;
border-top: 1px solid #fff4;
transition-property: background-color;
transition-duration: 250ms;
}
.option-reveal:focus-within,
.option-reveal:hover {
background-color: #fff2;
}
.option-one-cell {
@ -73,11 +83,11 @@
}
.text-field {
background: var(--white);
color: var(--black);
background-color: var(--black);
color: var(--white);
font: inherit;
border: none;
padding: 6px 0 6px 10px;
padding: 6px 6px 6px 10px;
width: 100%;
box-sizing: border-box;
border-radius: 4px;
@ -118,6 +128,11 @@
svg {
fill: var(--header-text-color);
}
&:focus {
outline: var(--header-text-color) solid 2px;
outline-offset: 0.25em;
}
}
.save-button,
@ -127,6 +142,11 @@
svg {
stroke: var(--header-text-color);
}
&:focus {
outline: var(--header-text-color) solid 2px;
outline-offset: 0.25em;
}
}
.button-opacity {

View File

@ -113,6 +113,13 @@
& > svg {
width: 47px;
overflow: visible;
}
&:focus .back-blob {
stroke: var(--deep-blue);
stroke-width: 5px;
animation: strokePulse 500ms ease forwards;
}
@media (min-width: 600px) {
@ -124,6 +131,15 @@
}
}
@keyframes strokePulse {
from {
stroke-width: 8px;
}
to {
stroke-width: 5px;
}
}
.back-blob {
fill: var(--hot-pink);
opacity: 0.77;