mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +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
@@ -336,7 +336,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7"
|
||||
className="h-11 w-11"
|
||||
onClick={() => moveSource(metric, index, -1)}
|
||||
disabled={index === 0 || saveMutation.isPending}
|
||||
aria-label={t("settings.sections.sources.moveUp")}
|
||||
@@ -347,7 +347,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7"
|
||||
className="h-11 w-11"
|
||||
onClick={() => moveSource(metric, index, 1)}
|
||||
disabled={
|
||||
index === list.length - 1 || saveMutation.isPending
|
||||
@@ -375,6 +375,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
onClick={() => setShowPerMetric((prev) => !prev)}
|
||||
aria-expanded={showPerMetric}
|
||||
aria-controls="sources-per-metric-panel"
|
||||
className="text-foreground hover:text-primary flex items-center gap-2 text-sm font-medium transition-colors"
|
||||
>
|
||||
<ChevronDown
|
||||
@@ -387,7 +388,11 @@ export function SourcesSection() {
|
||||
})}
|
||||
</button>
|
||||
{showPerMetric && (
|
||||
<div className="bg-background/30 border-border space-y-3 rounded-md border p-3">
|
||||
<div
|
||||
id="sources-per-metric-panel"
|
||||
role="region"
|
||||
className="bg-background/30 border-border space-y-3 rounded-md border p-3"
|
||||
>
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("settings.sections.sources.perMetricHelp")}
|
||||
</p>
|
||||
@@ -434,6 +439,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
onClick={() => setShowDeviceType((prev) => !prev)}
|
||||
aria-expanded={showDeviceType}
|
||||
aria-controls="sources-device-type-panel"
|
||||
className="text-foreground hover:text-primary flex items-center gap-2 text-sm font-medium transition-colors"
|
||||
>
|
||||
<ChevronDown
|
||||
@@ -446,7 +452,11 @@ export function SourcesSection() {
|
||||
})}
|
||||
</button>
|
||||
{showDeviceType && (
|
||||
<div className="bg-background/30 border-border space-y-3 rounded-md border p-3">
|
||||
<div
|
||||
id="sources-device-type-panel"
|
||||
role="region"
|
||||
className="bg-background/30 border-border space-y-3 rounded-md border p-3"
|
||||
>
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("settings.sections.sources.deviceTypeHelp")}
|
||||
</p>
|
||||
@@ -484,7 +494,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7"
|
||||
className="h-11 w-11"
|
||||
onClick={() =>
|
||||
moveDeviceType("__default__", index, -1)
|
||||
}
|
||||
@@ -497,7 +507,7 @@ export function SourcesSection() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7"
|
||||
className="h-11 w-11"
|
||||
onClick={() => moveDeviceType("__default__", index, 1)}
|
||||
disabled={
|
||||
index === list.length - 1 || saveMutation.isPending
|
||||
|
||||
Reference in new issue
Block a user