fix(20): WR-05 add aria-describedby to admin toggle for last-admin error

Link the admin role="switch" toggle button to the profile-error region
via aria-describedby so screen-reader users who activate the toggle
hear the last-admin error announcement — matching the existing link on
the display-name input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-06-18 18:02:27 -04:00
co-authored by Claude Sonnet 4.6
parent 2fd253ea95
commit d2e9862849
@@ -540,6 +540,7 @@ export function MemberEditorSheet({
role="switch" role="switch"
aria-checked={isAdmin} aria-checked={isAdmin}
aria-label="Admin" aria-label="Admin"
aria-describedby={profileError ? 'profile-error' : undefined}
onClick={() => { onClick={() => {
setProfileError(null); setProfileError(null);
setIsAdmin((prev) => !prev); setIsAdmin((prev) => !prev);