Skip to content

fix(dashboard): name unlabeled controls on Contacts, Privacy, Quick Replies - #6

Merged
buluma merged 1 commit into
mainfrom
fix/dashboard-a11y-contacts-privacy-quickreplies
Sep 4, 2026
Merged

fix(dashboard): name unlabeled controls on Contacts, Privacy, Quick Replies#6
buluma merged 1 commit into
mainfrom
fix/dashboard-a11y-contacts-privacy-quickreplies

Conversation

@buluma

@buluma buluma commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Found while dry-running a rebase onto upstream: upstream carries an a11y-controls.test.ts guard this fork doesn't have, and running it against fork's own pages surfaced real, pre-existing gaps in 3 fork-only pages.

  • Contacts.tsx: session <select> had no accessible name; the full-name and first-name <input>s had a visible sibling <label> with no htmlFor/id link.
  • Privacy.tsx: session <select> had no accessible name; the 7 field <select>s (lastSeen/profilePicture/status/online/readReceipts/groupsAdd/call/messages/defaultDisappearingMode) each had a visible sibling <label> with no htmlFor/id link.
  • QuickReplies.tsx: session <select> had no accessible name; the message <textarea> had a visible sibling <label> with no htmlFor/id link.

Fix: the session pickers (no visible caption at all) get aria-label={t('messageTester.session')} — reusing the existing, already-translated, generic "Session" string rather than adding new copy. Everything else already had real caption text next to it, so it's just wiring id/htmlFor — no new content.

Verified against upstream's actual test file (not committed here — adopting the whole a11y guard is a separate decision): after these changes, zero findings remain for these 3 pages. The test's remaining failures are all in other, unrelated fork pages (FilterBuilder, ChatSidebar, Infrastructure, MessageTester, Plugins, Templates, Webhooks, ApiKeys, StatusComposeModal) — out of scope here.

Also noticed, not fixed here

Contacts.tsx, Privacy.tsx and QuickReplies.tsx call t() with keys under contacts.*/privacy.*/quickReplies.* namespaces that don't exist in ANY locale file, including en.json — the pages currently render raw translation keys instead of text for their own content. Not touched in this PR (would mean authoring ~800 lines of new UI copy across 3 pages); flagging since it's a real, separate gap.

Validation

  • npm run build (dashboard: tsc -b && vite build) — clean
  • npm run lint — clean
  • npm run i18n:check — passes
  • npm run test:unit — 266/266 passed

Summary by CodeRabbit

  • Accessibility
    • Added accessible names to session selectors across dashboard pages.
    • Improved accessibility for contact name fields, privacy settings, and the Quick Replies message field.
    • Labels are now properly associated with their corresponding controls for improved assistive technology support.

…cts, Privacy, Quick Replies

The session <select> on all three pages, the full/first name inputs on
Contacts, the field selects on Privacy, and the message textarea on
Quick Replies rendered with no accessible name — a screen reader
announced an anonymous control. Session pickers get aria-label
(messageTester.session, already-translated and generic enough to
reuse); the rest already had a sibling <label> with real text, so
they just needed id/htmlFor wired up.
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 86c0de49-c12d-4cd9-9a83-06158c1ac785

📥 Commits

Reviewing files that changed from the base of the PR and between 84967c3 and a8bf524.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • dashboard/src/pages/Contacts.tsx
  • dashboard/src/pages/Privacy.tsx
  • dashboard/src/pages/QuickReplies.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Dashboard session selectors and form controls now expose accessible names through aria-label or associated labels. The changelog records these accessibility updates.

Changes

Dashboard accessibility

Layer / File(s) Summary
Contacts form labels
dashboard/src/pages/Contacts.tsx
The session selector and contact-name inputs now have accessible labels.
Privacy setting labels
dashboard/src/pages/Privacy.tsx
The session selector and privacy-setting selects now use explicit label associations.
Quick Replies labels
dashboard/src/pages/QuickReplies.tsx, CHANGELOG.md
The session selector and message textarea now have accessible labels. The changelog documents the updates.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a8bf5

This change adds accessible names and label associations to dashboard form controls without altering their behavior. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding accessible names to previously unlabeled dashboard controls on Contacts, Privacy, and Quick Replies.
Description check ✅ Passed The description provides detailed scope, implementation context, out-of-scope items, and validation results. It does not use all template headings or explicitly mark the change type and checklist item…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dashboard-a11y-contacts-privacy-quickreplies

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

dashboard/src/pages/Contacts.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

dashboard/src/pages/Privacy.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

dashboard/src/pages/QuickReplies.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).


Comment @coderabbitai help to get the list of available commands.

@buluma
buluma merged commit f2e2680 into main Sep 4, 2026
9 checks passed
@buluma
buluma deleted the fix/dashboard-a11y-contacts-privacy-quickreplies branch September 4, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant