Skip to content

fix(ui): add ARIA roles, labels and focus management to BaseModal, DataTable, HostSelectionDialog (#4806)#4980

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-4806
Apr 17, 2026
Merged

fix(ui): add ARIA roles, labels and focus management to BaseModal, DataTable, HostSelectionDialog (#4806)#4980
mrveiss merged 1 commit intoDev_new_guifrom
issue-4806

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 17, 2026

Closes #4806

Summary

  • BaseModal: stable _uid-based IDs, focus-visible focus ring on close button
  • DataTable: scope="col" on <th>, role="columnheader" on sortable headers, aria-busy/aria-live for loading state, <nav> landmark for pagination with descriptive button labels, aria-hidden on icons, .sr-only utility class
  • HostSelectionDialog: role="dialog" + aria-modal + aria-labelledby/describedby, focus trap with restore-on-close, role="radiogroup", role="alert" on error, aria-hidden on all decorative icons, type="button" on all buttons, aria-busy on submit, focus-visible rings

Test Status

PASS — no new TypeScript errors

…ostSelectionDialog (#4806)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit 4205659 into Dev_new_gui Apr 17, 2026
1 of 3 checks passed
@mrveiss mrveiss deleted the issue-4806 branch April 17, 2026 09:00
mrveiss added a commit that referenced this pull request Apr 17, 2026
…al (#5016)

PR #4980 introduced a naive focusin listener that snapped focus back to
the first focusable element any time focus left the dialog. This broke
Shift+Tab wrap (first -> last) and hijacked focus on every outside click
(devtools, other apps, etc.).

Replace with a Tab/Shift+Tab keydown handler on the dialog root that only
intercepts when focus would leave the dialog boundary, then wraps to the
opposite end. Middle tabs fall through to browser default.

Also swap the deprecated `Math.random().toString(36).substr(2, 9)` ARIA
_uid for Vue 3.5's `useId()` (Vue 3.5.31 confirmed in package.json).

Tests (10 new, all passing):
- Shift+Tab on first wraps to last
- Tab on last wraps to first
- Middle Tabs do not preventDefault
- Outside focus is not bounced back (regression test)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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