fix(accessibility): group search filters into single section landmark and remove individual facet landmarks (#5497) - #6172
Conversation
…ngle section landmark (DSpace#5497)
|
Apologies for the delay on this! The PR is ready for review, looking forward to your feedback. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes align with the stated accessibility goal and the added unit tests directly validate the new landmark behavior.
Pull request overview
This PR addresses accessibility “landmark overload” in the search filter sidebar by removing per-facet region landmarks and introducing a single, labeled <section> landmark that groups the entire filters panel.
Changes:
- Wrapped
SearchFiltersComponenttemplate content in a<section>with a translatedaria-labelto provide a single landmark for the filter panel. - Removed
role="region"from the per-facet filter container inSearchFilterComponentto avoid exposing each facet as a separate landmark. - Added unit tests asserting the presence of the section landmark label and the absence of
role="region"on individual facets.
File summaries
| File | Description |
|---|---|
| src/app/shared/search/search-filters/search-filters.component.html | Introduces a single labeled <section> landmark wrapping the filter panel. |
| src/app/shared/search/search-filters/search-filters.component.spec.ts | Adds an accessibility unit test for the section landmark and non-empty aria-label. |
| src/app/shared/search/search-filters/search-filter/search-filter.component.html | Removes role="region" from individual facet containers to reduce landmark noise. |
| src/app/shared/search/search-filters/search-filter/search-filter.component.spec.ts | Adds a unit test asserting facets are not exposed as region landmarks. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hi @MoamenElbarqy, thank you for your contribution to DSpace! This is added to a project board for reviewers to take a look. One request, could you please add some instructions to manually test this fix, in this case how to view the difference before and after of the region landmarks structure of the page? I'm also seeing that the issue author didn't specify which tool they used to see the landmark issue, but as long as it's reproducing and fixing the same issue any tool you used to test would work. Thank you! |
|
Hi @lgeggleston Here are the step-by-step instructions to manually test and inspect the landmark structure before and after this fix: Recommended Tool:You can use the Landmark Navigation via Keyboard or Pop-up Chrome extension. Step-by-Step Testing Guide:
Expected Behavior (Before vs After):
Here is a screenshot demonstrating the resolved landmark structure:
|

References
Description
This PR resolves accessibility landmark overload in the search filters by removing
role="region"from individual facet filters and grouping the entire filter component under a single labeled<section>landmark.Instructions for Reviewers
List of changes in this PR:
role="region"fromSearchFilterComponent(search-filter.component.html) so individual facets (e.g. Author, Subject, Date, Item Type) are no longer exposed as separate region landmarks.SearchFiltersComponent(search-filters.component.html) in a semantic<section [attr.aria-label]="filterLabel + '.filters.head' | translate">landmark to provide a single labeled region for the entire search filters panel.search-filter.component.spec.tsandsearch-filters.component.spec.ts.How to test: