Skip to content

fix(a11y): brand link accessible name omits its visible tagline #62

Closed

Description

@DevSecNinja

Problem

axe-core 4.14 (Renovate PR #57) flags the header brand link with the serious rule
label-content-name-mismatch
(WCAG 2.5.3 Label in Name). The accessibility e2e test
tests/e2e/share-event.spec.ts ("has no serious or critical accessibility violations")
fails on chromium, firefox and webkit:

<a class="brand" href="./" aria-label="Worldtime">
  <span class="brand-mark" aria-hidden="true"><span></span></span>
  <span><strong>Worldtime</strong><small>One moment. Every time zone.</small></span>
</a>

The aria-label ("Worldtime") overrides the link's visible text ("Worldtime One moment.
Every time zone."), so speech-input users who say what they see can't reliably activate it.

Failing run: https://github.com/DevSecNinja/worldtime/actions/runs/43554001127/job/132322605880

Fix

Remove the redundant aria-label from the brand link in src/components/AppHeader.tsx, so its
accessible name comes from its visible text. The decorative mark stays aria-hidden. No visual
change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions