fix(a11y): WCAG 2 AA contrast and keyboard access

This commit is contained in:
Moritz 2026-02-18 22:48:56 +01:00
parent e4e6cfdd47
commit a23f999eee
Signed by: moritz
GPG key ID: 1020A035E5DD0824
6 changed files with 43 additions and 4 deletions

View file

@ -99,6 +99,25 @@
/* Make LiveView wrapper divs transparent for layout */
[data-phx-session] { display: contents }
/* WCAG 1.4.12 Text Spacing: allow user stylesheets to adjust text spacing in popovers.
Popover content (e.g. from DaisyUI dropdown) must not rely on non-overridable inline
spacing; use inherited values so custom stylesheets can override. */
[popover] {
line-height: inherit;
letter-spacing: inherit;
word-spacing: inherit;
}
/* WCAG 2 AA: success/error text on light backgrounds (e.g. base-200). Use instead of
text-success/text-error when contrast ratio of theme colors is insufficient. */
.text-success-aa {
color: oklch(0.35 0.12 165);
}
.text-error-aa {
color: oklch(0.45 0.2 25);
}
/* ============================================
Sidebar Base Styles
============================================ */