mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
fix(a11y): WCAG touch-target floor + ARIA pairing across W4–W9 surfaces
Extends the W8.3 44px touch-target rule and the W8e accordion ARIA contract to surfaces that shipped without them: - Insights tab-strip pills: pills are primary navigation; promote to `min-h-11` so a thumb tap on "Stimmung" cannot bleed into the neighbour two pixels below. - Injection-site picker: raise the invisible hit-target radius from 11 to 12 SVG units so the rendered diameter (\~25.6 CSS px) clears the WCAG 2.5.8 Level AA 24×24 floor. The abdomen left/right pair at \Δx=24 caps the upper bound — larger circles would collide. - Source-priority reorder arrows (per-metric + device-type axes): promote four `h-7 w-7` icon buttons to `h-11 w-11`. - Sub-page heading: replace the bare `focus-visible:outline-none` with the same ring vocabulary used by insights pills + the Coach drawer so sighted-keyboard users get a visible indicator on programmatic focus. - Source-priority per-metric + device-type accordions: pair `aria-expanded` with `aria-controls` + matching `id` on the panel, mirroring the W8e Provenance contract. - Maintainership banner dismiss button: 22×22 hit zone replaced by a 44×44 inline-flex button that keeps the same icon size. - Injection-site picker group: `aria-label` was leaking the cadence-preset string; introduce `medications.injectionSitePickerAriaLabel` and translate it across all six locales. - Body-outline SVG: hardcoded English "Body outline" replaced by `medications.injectionSiteBodyOutlineAriaLabel` with native translations in DE/FR/IT/ES/PL.
This commit is contained in:
1 parent
04dd972358
commit
72fcdc656f
11 files changed
+54
-19
No files matched your search
@@ -51,13 +51,13 @@ export function InjectionSitePicker({
|
||||
<div
|
||||
className={`flex flex-col items-center gap-3 ${className ?? ""}`}
|
||||
role="group"
|
||||
aria-label={t("medications.glp1WeeklyPresetTitle")}
|
||||
aria-label={t("medications.injectionSitePickerAriaLabel")}
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 120 300"
|
||||
className="text-foreground/40 h-[320px] w-auto max-w-full"
|
||||
role="img"
|
||||
aria-label="Body outline"
|
||||
aria-label={t("medications.injectionSiteBodyOutlineAriaLabel")}
|
||||
>
|
||||
{/* Head */}
|
||||
<circle
|
||||
@@ -162,12 +162,17 @@ export function InjectionSitePicker({
|
||||
}
|
||||
strokeWidth="1.5"
|
||||
/>
|
||||
{/* Invisible 22px hit-target for touch — meets WCAG 2.5.5
|
||||
without crowding the visible 12px dot. */}
|
||||
{/* Invisible 24-unit hit-target for touch. The SVG renders
|
||||
at ≈1.07× scale (320px box / 300-unit viewBox height),
|
||||
so r=12 gives ≈25.6 CSS px diameter — clearing the
|
||||
WCAG 2.5.8 Level AA 24×24 floor. Going larger would
|
||||
overlap the abdomen-left / abdomen-right pair at
|
||||
Δx=24 units; the picker stays interactive without
|
||||
spacing collisions. */}
|
||||
<circle
|
||||
cx={coord.x}
|
||||
cy={coord.y}
|
||||
r="11"
|
||||
r="12"
|
||||
fill="transparent"
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
|
||||
Reference in new issue
Block a user