Skip to content

🎨 Palette: [UX improvement] Modal accessibility for anchor tags#102

Open
0m364 wants to merge 1 commit into
add-0m364-website-1232764033486168073from
palette-sitrep-btn-a11y-11921853009120948636
Open

🎨 Palette: [UX improvement] Modal accessibility for anchor tags#102
0m364 wants to merge 1 commit into
add-0m364-website-1232764033486168073from
palette-sitrep-btn-a11y-11921853009120948636

Conversation

@0m364

@0m364 0m364 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

💡 What:
Added role="button" and aria-haspopup="dialog" to the #sitrep-btn <a> elements across the site. Added a keydown listener in modal.js that allows Spacebar to trigger the openModal function while preventing the page from scrolling down.

🎯 Why:
The 'OSINT' button acts as a modal trigger but uses an anchor tag <a> with href="#". Native anchor tags only trigger on the Enter key. Keyboard users and screen readers expect button-like elements to also respond to the Spacebar key. Without ARIA roles, screen readers announce it merely as a link to nowhere, rather than a button that opens a dialog.

📸 Before/After:
Before: Pressing Spacebar while focused on the 'OSINT' link scrolled the page down. Screen readers announced "link, OSINT".
After: Pressing Spacebar opens the Situation Report modal. Screen readers announce "button, OSINT, has popup dialog".

♿ Accessibility:

  • Added role="button"
  • Added aria-haspopup="dialog"
  • Bound Spacebar to open the modal (with e.preventDefault())

PR created automatically by Jules for task 11921853009120948636 started by @0m364

Added keyboard accessibility to anchor tags used as buttons (the 'OSINT' sitrep trigger).
- Bound 'Spacebar' key events in JavaScript to prevent default scrolling and trigger the modal.
- Added `role="button"` and `aria-haspopup="dialog"` to the anchor tags in HTML so screen readers properly identify them.
- Documented findings in `.Jules/palette.md`.
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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