Skip to content

Improve accessibility for help buttons in server UI#117

Open
daiverd wants to merge 4 commits intoChHarding:mainfrom
daiverd:server-ui-accessibility-fixes
Open

Improve accessibility for help buttons in server UI#117
daiverd wants to merge 4 commits intoChHarding:mainfrom
daiverd:server-ui-accessibility-fixes

Conversation

@daiverd
Copy link
Copy Markdown

@daiverd daiverd commented Mar 29, 2026

Summary

  • Refactor help buttons to use a reusable Jinja macro with proper ARIA attributes
  • Help content containers now appear immediately after buttons in DOM order
  • Dynamic aria-expanded updates when popovers show/hide
  • Fix heading hierarchy (h4 → h1 for main title)

Why

Screen readers need to understand the relationship between help buttons and their content. The previous implementation had two problems:

  1. No ARIA labeling - Screen readers couldn't tell users what the button does or whether help is currently visible
  2. DOM placement - Bootstrap's default container: 'body' appends popover content to the end of <body>, breaking the logical reading order

What this changes

The new help_popover macro generates buttons with:

  • aria-expanded - indicates whether help content is visible
  • aria-controls - links button to its content container
  • Content container (<div id="X-content">) placed immediately after the button

This means when a screen reader user activates a help button, the help text appears right after in reading order rather than at the end of the document.

Test plan

  • Verify help popovers still appear and function correctly
  • Test with screen reader (VoiceOver/NVDA) to confirm help text is announced after button activation
  • Check that aria-expanded toggles between true/false when opening/closing popovers

David Sexton added 4 commits March 27, 2026 12:55
- Add aria-expanded attributes to collapsible panel links in index.html
- Replace clickable img with proper button element in intro.html
- Add macros.html with help_popover macro that includes:
  - aria-expanded attribute for screen reader state
  - aria-controls pointing to adjacent content container
  - Content container placed immediately after button in DOM

- Update index.html to use the macro for all help buttons
- Fix heading hierarchy: change h4 to h1 for main title
- Add aria-expanded toggle handlers in JS for popover events
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