fix(ui): add ARIA roles, labels and focus management to BaseModal, DataTable, HostSelectionDialog (#4806)#4980
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 17, 2026
Merged
Conversation
…ostSelectionDialog (#4806) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4806
Summary
_uid-based IDs,focus-visiblefocus ring on close buttonscope="col"on<th>,role="columnheader"on sortable headers,aria-busy/aria-livefor loading state,<nav>landmark for pagination with descriptive button labels,aria-hiddenon icons,.sr-onlyutility classrole="dialog"+aria-modal+aria-labelledby/describedby, focus trap with restore-on-close,role="radiogroup",role="alert"on error,aria-hiddenon all decorative icons,type="button"on all buttons,aria-busyon submit,focus-visibleringsTest Status
PASS — no new TypeScript errors