fix(persons): make the show-all switch accessible name match its visible text
The role="switch" toggle set a fixed aria-label of "Zu prüfen (N)" while its visible text flips to "Alle anzeigen" when active — a visible-text / accessible-name mismatch (WCAG 2.5.3 Label in Name). Drop the aria-label so the visible text is the accessible name; aria-checked carries the state. Refs #667 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -132,11 +132,13 @@ const chipInactive = 'border-line bg-surface text-ink hover:bg-muted';
|
|||||||
|
|
||||||
<!-- Show-all / Zu prüfen toggle: transcriber-only, reveals the import noise. -->
|
<!-- Show-all / Zu prüfen toggle: transcriber-only, reveals the import noise. -->
|
||||||
{#if canWrite}
|
{#if canWrite}
|
||||||
|
<!-- No aria-label: the visible text IS the accessible name (WCAG 2.5.3 Label in Name).
|
||||||
|
It flips between "Zu prüfen (N)" (off) and "Alle anzeigen" (on) and aria-checked
|
||||||
|
carries the toggle state, so the announced name always matches what the user reads. -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
role="switch"
|
role="switch"
|
||||||
aria-checked={review}
|
aria-checked={review}
|
||||||
aria-label={m.persons_toggle_needs_review({ count: needsReviewCount })}
|
|
||||||
class={[chipBase, 'sm:ml-auto', review ? chipActive : chipInactive]}
|
class={[chipBase, 'sm:ml-auto', review ? chipActive : chipInactive]}
|
||||||
onclick={() => setReview(!review)}
|
onclick={() => setReview(!review)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user