fix(a11y): give icon-only buttons accessible names on the medications page

Lighthouse v1.4.33 a11y run flagged "links without discernible name"
(score 91/94). The medications page renders five icon-only buttons
(reset-form dropdown, three copy actions, status dropdown) without
an aria-label, so the SR announcement collapses to the role name.

This patch reuses existing common.* translation keys (no new strings
added; messages/*.json off-limits for IW9):

- the reset / status DropdownMenu triggers get `common.moreOptions`,
- the three copy icon-buttons get `common.copy`.

Icon-only buttons in `src/components/settings/**` (IW4),
`src/components/insights/coach-panel/**` (IW5), and the bottom-nav
already carry aria-labels per earlier polish rounds.
This commit is contained in:
Marc-André Bombeck committed 2026-05-16 17:53:29 +02:00
1 parent 2c0d0d2969
commit 0cac3d3545
1 file changed
+5
+5
View File
@@ -482,6 +482,7 @@ function IntakeImportDialog({
size="icon"
className="h-9 w-9"
disabled={importing}
aria-label={t("common.moreOptions")}
>
<MoreHorizontal className="h-4 w-4" />
</Button>
@@ -732,6 +733,7 @@ function ApiEndpointDialog({
size="icon"
className="h-8 w-8 shrink-0"
onClick={() => copyText(endpoint, "url")}
aria-label={t("common.copy")}
>
<Copy className="h-3.5 w-3.5" />
</Button>
@@ -756,6 +758,7 @@ function ApiEndpointDialog({
size="icon"
className="h-8 w-8 shrink-0"
onClick={() => copyText(token, "token")}
aria-label={t("common.copy")}
>
<Copy className="h-3.5 w-3.5" />
</Button>
@@ -807,6 +810,7 @@ function ApiEndpointDialog({
size="icon"
className="absolute top-1 right-1 h-7 w-7"
onClick={() => copyText(selectedExample.value, "example")}
aria-label={t("common.copy")}
>
<Copy className="h-3 w-3" />
</Button>
@@ -833,6 +837,7 @@ function ApiEndpointDialog({
size="icon"
className="h-9 w-9"
disabled={loadingStatus || toggling}
aria-label={t("common.moreOptions")}
>
<MoreHorizontal className="h-4 w-4" />
</Button>