mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
feat: add accessible form element focus indicator
adds a focus indicator that passes the accessibility requirements WCAG 2.2: §1.4.11 & §2.4.7
This commit is contained in:
parent
c9c3b88f4d
commit
3e070676e4
@ -3,6 +3,12 @@ section.index-search {
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
/* TODO: move to a global file? it’s not only for forms. */
|
||||
section.index-search :focus-visible {
|
||||
outline: 2px solid var(--white);
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
section.start a.search-link {
|
||||
color: var(--highlight);
|
||||
font-size: 2.5em;
|
||||
|
@ -14,10 +14,18 @@ input[type="text"] {
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
outline: solid var(--highlight);
|
||||
background-color: var(--highlight);
|
||||
}
|
||||
|
||||
/* TODO: generalise this a bit */
|
||||
button:focus,
|
||||
input[type="submit"]:focus,
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
outline: 2px solid var(--white);
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 0;
|
||||
border-radius: 3px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user