🎨 Palette: Improve MatchPreviewModal Accessibility & Keyboard Navigation - #89
🎨 Palette: Improve MatchPreviewModal Accessibility & Keyboard Navigation#89jspann21 wants to merge 1 commit into
Conversation
…reviewModal Added an explicit `Escape` keydown listener to `MatchPreviewModal` to allow users to dismiss it using the keyboard. Included `role="dialog"` and `aria-modal="true"` to ensure screen readers properly announce the container as a modal. Also added a `title` attribute to the truncated candidate titles so users can view the full text on hover. Co-authored-by: jspann21 <179991454+jspann21@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Improved the accessibility of the
MatchPreviewModal.keydownevent listener for theEscapekey that closes the modal.role="dialog"andaria-modal="true"to the modal's container element.titleattribute to the candidate titles in the selection list.🎯 Why:
Custom modal components (built with
divs rather than native<dialog>elements) lack native keyboard and screen-reader behaviors.Escapekey listener, keyboard users are forced to tab to the "Cancel" button.truncate), meaning long titles were permanently cut off. Adding thetitleattribute enables a native OS tooltip so users can read the full text before confirming a match.📸 Before/After:
(Visual changes are minimal, primarily consisting of the native OS tooltip appearing when hovering over truncated titles in the list)
♿ Accessibility:
role="dialog",aria-modal="true").Escapeto close).PR created automatically by Jules for task 11510507886073752544 started by @jspann21