Skip to content

Fix notification settings toggles losing their accessible name and click-target #769

Description

@Abidoyesimze

Summary

PreferenceToggle's wrapper was changed from a to a plain

, and the new is rendered with no label prop. Switch's own internal only renders visible text when label is passed, so the checkbox now has no accessible name at all, and clicking the title/description text no longer toggles it (previously the whole card was the label). The sibling security-settings migration in the same commit correctly passes a label prop — only the notifications page regressed.

Affected files

  • src/app/dashboard/settings/notifications/page.tsx
  • src/components/ui/Switch.tsx

Tasks

  • Pass a label prop to each Switch instance in PreferenceToggle, matching the pattern used in security/page.tsx and NotificationPreferences.tsx.
  • Verify clicking the title/description text (not just the switch itself) toggles the preference again.

Acceptance criteria

  • Scope is limited to the files listed (or agreed alternatives in the PR).
  • Change is verifiable: tests, screenshots, or written QA steps in the PR.
  • No behavior regressions in related user flows.
  • No new duplicate abstractions without a one-line rationale in the PR.

Suggested labels

bug, a11y, settings, priority-high

Notes

Sourced from the 2026-08 round-4 follow-up audit of the frontend codebase at commit 201f5b0, run after the round-3 batch (#684-#743) was substantially resolved. Verified against current file content at time of writing.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions