Skip to content

Announce the current nav page and feedback confirmation to screen readers (#179) - #507

Open
chanellebingham wants to merge 2 commits into
wagtail:mainfrom
chanellebingham:fix-179-aria-current-feedback-status
Open

chanellebingham wants to merge 2 commits into
wagtail:mainfrom
chanellebingham:fix-179-aria-current-feedback-status

Conversation

@chanellebingham

Copy link
Copy Markdown

Relates to #179

Description

This fixes three of the VoiceOver problems from #179, not the whole issue. The main navigation now announces which page you're on, and the happy/unhappy feedback buttons now say something when you press them and move focus to the thank-you message instead of dropping it back to the page.

The link for the page you're on now also gets aria-current="page", so screen readers announce it as the current page. The "active" class is still there, so it looks the same as before.

One thing for reviewers: after you press a feedback button, focus moves to the same box that announces the message, so some screen readers might read it twice. I kept both on purpose, because moving focus alone isn't always announced, and the announcement alone doesn't fix the lost focus. Moving focus to the comment box instead would also work, if you'd prefer that.

Testing

The new tests fail on main and pass with this change: npm test gives 25 passed. I haven't tried it with a real screen reader yet.

AI usage

I used Claude Code for this PR. The changes it helped with are: the code (feedback.html, active-nav-item/index.js, feedback/index.js, feedback.scss), (test_feedback.py, active-nav-item/index.test.js, feedback/index.test.js).

This branch has not been deployed

No deployments
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