WCAG 2.2 Accessibility - Screen Reader Focus Order - #542
Merged
jpherr merged 1 commit intoJul 27, 2026
Conversation
Context: Update focus order of title in summary card on entity page When screen reader users encounter the planning and housing data results, the focus order does not match the way the data is presented visually on the page. The order of elements in the DOM does not match the visual sequence, meaning screen reader users encounter the headings initially and then the information above it visually, followed by information below it in the description lists. Additionally, sections are presented inside <article> tags, which is an incorrect element type for this type of data and should be used for content such as newspaper articles, forum or blog posts. The original implementation reversed the order of elements via CSS but there's no description in the original PR, so it's not known why it was implemented this way. It may have in itself been for accessibility reasons. This change retains the natural order of elements for all users. Changes: - Update order of elements in DOM and acknowledge in CSS - Change article element to section
Contributor
WalkthroughEntity cards now use ChangesEntity card accessibility
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jpherr
deleted the
708-dac_screen_reader_focus_order_01-focus-order-does-not-match-visual-order-in-results
branch
July 27, 2026 14:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
WCAG 2.2 Accessibility optimisation
Update focus order of title in summary card on entity page
When screen reader users encounter the planning and housing data results, the focus order does not match the way the data is presented visually on the page. The order of elements in the DOM does not match the visual sequence, meaning screen reader users encounter the headings initially and then the information above it visually, followed by information below it in the description lists. Additionally, sections are presented inside
<article>tags, which is an incorrect element type for this type of data and should be used for content such as newspaperarticles, forum or blog posts.
The original implementation reversed the order of elements via CSS but there's no description in the original PR, so it's not known why it was implemented this way. It may have in itself been for accessibility reasons. This change retains the natural order of elements for all users.
Changes:
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.
[optional] Are there any post deployment tasks we need to perform?
[optional] Are there any dependencies on other PRs or Work?
Summary by CodeRabbit