Fix modal ARIA and accessibility issues#28
Draft
Copilot wants to merge 4 commits into
Draft
Conversation
Co-authored-by: ethandunzer <180557240+ethandunzer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix modal ARIA and accessibility issues
Fix modal ARIA and accessibility issues
Mar 13, 2026
ethandunzer
reviewed
Mar 13, 2026
Co-authored-by: ethandunzer <180557240+ethandunzer@users.noreply.github.com>
Co-authored-by: ethandunzer <180557240+ethandunzer@users.noreply.github.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.
The modal dialog lacked proper ARIA labeling, focus management, and keyboard support, making it inaccessible to screen reader and keyboard-only users.
Description
scheduledMaintenanceComponent.htmlaria-labelledby="modal-heading-01"andaria-describedby="modal-content-01"to<section role="dialog">idattributes to the title<h2>and content<div>onkeydown={handleKeyDown}to the section for keyboard event capturescheduledMaintenanceComponent.js_focusableSelectors— shared selector constant used by both focus methodsrenderedCallback— moves focus to first focusable element on modal open (tracked via_previousIsModalOpenflag to avoid re-triggering on every render)handleKeyDown— Escape closes modal (when dismissible/not locked); Tab/Shift+Tab trap focus within the modal usingthis.template.activeElement.gitignorepackage-lock.jsonto.gitignoreto prevent it from being accidentally committedType of change
How Has This Been Tested?
npm test)Checklist:
Screenshots (if applicable):
N/A — changes are structural/behavioral, no visual diff.
Additional Notes
LWC synthetic shadow automatically scopes element IDs by appending a suffix (e.g.
-0).aria-labelledby/aria-describedbyreferences are updated to match by the engine, so the linkage is correct at runtime even though the raw attribute value differs from the template string.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.