Skip to content

fix(a11y): include visible text in the language toggle's accessible name - #111

Merged
ilramdhan merged 2 commits into
mainfrom
fix/a11y-language-toggle-name
Oct 30, 2026
Merged

ilramdhan merged 2 commits into
mainfrom
fix/a11y-language-toggle-name

Conversation

@ilramdhan

Copy link
Copy Markdown
Owner

Summary

The landing language toggle shows "EN"/"ID", but its aria-label ("Ganti bahasa ke English") didn't contain that text. axe-core 4.14 now flags this as a serious label-content-name-mismatch (WCAG 2.5.3 Label in Name), which is why E2E (local build) fails in dependabot #103.

The label now ends with the visible code: "Ganti bahasa ke English (EN)" / "Switch language to Bahasa Indonesia (ID)".

Closes #109

Type of change

  • fix – bug fix

How to test

  1. Open / and check the language button: the screen reader reads "Ganti bahasa ke English (EN)", and the tooltip shows the same text.
  2. bun run test -- src/components/landing (the existing role/name query still matches).
  3. After merge, rebase chore(deps): Bump the minor-and-patch group across 1 directory with 27 updates #103 (@dependabot rebase). Its E2E should go green.

Checklist

  • bun run lint, bunx tsc --noEmit and bun run test pass locally (landing + i18n tests; see notes in fix(security): resolve CodeQL code scanning alerts #110)
  • bun run build passes (not needed, string-only change; CI covers it)
  • Follows the architecture rules in AGENTS.md
  • Database changes: none
  • No secrets, tokens or personal data in code, logs, fixtures or screenshots
  • Server-only secrets stay in *.server.ts / server functions and are never exposed via VITE_*
  • Accessibility considered: this is the a11y fix
  • UI strings added for both Indonesian and English
  • PR title follows Conventional Commits
  • Docs updated: not needed
  • No force-push / history rewrite of commits already on main

🤖 Generated with Claude Code

axe-core 4.14 reports label-content-name-mismatch on the landing,
privacy and terms pages: the button shows "EN"/"ID" but its aria-label
didn't contain it (WCAG 2.5.3). Unblocks the E2E check in #103.

Closes #109

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 02:10
@ilramdhan ilramdhan added bug Something isn't working accessibility Barrier affecting people with disabilities labels Oct 30, 2026
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
demo-2ndbrain.ilramdhan.dev Ready Ready Preview Oct 30, 2026 2:14am UTC
second-brain Ready Ready Preview Oct 30, 2026 2:14am UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T02:10:39.572030Z
We couldn’t complete this review. Comment @codex review to try again.
2033cd2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 02:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@ilramdhan
ilramdhan merged commit 467757d into main Oct 30, 2026
20 checks passed
@ilramdhan
ilramdhan deleted the fix/a11y-language-toggle-name branch October 30, 2026 02:15
ilramdhan added a commit that referenced this pull request Oct 30, 2026
axe-core 4.14 drops parentheticals before matching label-content-name-mismatch,
so the "(EN)" suffix added in #111 did not count. Leading with the visible
code ("EN – Ganti bahasa ke English") satisfies WCAG 2.5.3 Label in Name.

Refs #109

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – second-brain — 2e990a11 Deployed Oct 30, 2026 by vercel[bot]
Preview – demo-2ndbrain.ilramdhan.dev — 2e990a11 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Barrier affecting people with disabilities bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(a11y): language toggle accessible name doesn't contain its visible text

2 participants