Skip to content

Fix focus reset after AJAX page navigation#31

Open
nonprofittechy wants to merge 4 commits into
SuffolkLITLab:v1.9.8.postfrom
nonprofittechy:fix/ajax-page-focus-order
Open

Fix focus reset after AJAX page navigation#31
nonprofittechy wants to merge 4 commits into
SuffolkLITLab:v1.9.8.postfrom
nonprofittechy:fix/ajax-page-focus-order

Conversation

@nonprofittechy
Copy link
Copy Markdown
Member

Summary

  • move post-navigation focus to the page title/question label instead of dropping focus
  • make the non-link #dapagetitle span programmatically focusable with tabindex="-1"
  • regenerate the shipped JS bundles and sourcemaps so the browser-served assets include the fix

Problem

After activating Continue and landing on a new page, the fallback focus logic could immediately blur the focused element or try to focus a non-focusable page title span. That left keyboard users in the middle of the page instead of at the top-most meaningful target.

Result

Keyboard and assistive-technology users now land on a stable, top-of-page focus target after AJAX page transitions, which keeps the tab order aligned with WCAG expectations.

Ensure the fallback page title target can receive programmatic focus after Continue-style navigation.\n\nAlso regenerate the shipped JS bundles so the focus-management change is present in the assets served to browsers.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nonprofittechy nonprofittechy marked this pull request as draft May 19, 2026 11:39
@nonprofittechy
Copy link
Copy Markdown
Member Author

Proposed fix for tab navigation issue that MATC pointed out to us; needs some testing.

@BryceStevenWilley
Copy link
Copy Markdown

I like the idea, but IMO it should target the Question title, not the page / interview title. Focusing to the page title doesn't really fix the number of tab presses it takes for a user to get to main content of the page, but starting focus on the question title would bring the user right there.

@nonprofittechy nonprofittechy marked this pull request as ready for review May 30, 2026 16:59
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.

2 participants