Skip to content

[ACS-10242] SR: Personal files: Filter by Size popup announces entire content instead of dialog title#11782

Open
dominikiwanekhyland wants to merge 1 commit intodevelopfrom
ACS-10242-sr-personal-files-filter-by-size-popup-announces-entire-content-instead-of-dialog-title
Open

[ACS-10242] SR: Personal files: Filter by Size popup announces entire content instead of dialog title#11782
dominikiwanekhyland wants to merge 1 commit intodevelopfrom
ACS-10242-sr-personal-files-filter-by-size-popup-announces-entire-content-instead-of-dialog-title

Conversation

@dominikiwanekhyland
Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)

https://hyland.atlassian.net/browse/ACS-10242

What is the new behaviour?

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an accessibility issue in the Content Services search header filter popup (notably “Filter by Size”), where screen readers announce the entire popup contents instead of a meaningful title.

Changes:

  • Updates the filter popup template to use semantic grouping (fieldset/legend) and revised focusable container markup.
  • Adjusts SCSS to support the new structure and spacing (removes container padding, adds fieldset/title/checklist spacing rules).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.html Restructures the popup container markup for improved accessible labeling/announcement.
lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.scss Adds styling for the new fieldset wrapper and updates padding/margins to match the new layout.

Comment on lines 22 to +30
<mat-menu #filter="matMenu" class="adf-filter-menu adf-search-filter-menu" (closed)="onClosed()">
<div #filterContainer role="menuitem" tabindex="0" (keydown.tab)="$event.stopPropagation()">
<div (click)="$event.stopPropagation()" role="button" tabindex="0" (keyup.enter)="$event.stopPropagation()" class="adf-filter-container">
<div class="adf-filter-title">{{ category?.name | translate }}</div>
<adf-search-widget-container
(keypress)="onKeyPressed($event, menuTrigger)"
[id]="category?.id"
[selector]="category?.component?.selector"
[settings]="category?.component?.settings"
[value]="initialValue"
[useHeaderQueryBuilder]="true"
/>
</div>
<fieldset
#filterContainer
tabindex="0"
[attr.aria-label]="category?.name | translate"
(click)="$event.stopPropagation()"
(keyup.enter)="$event.stopPropagation()"
(keydown.tab)="$event.stopPropagation()"
class="adf-filter-container adf-filter-fieldset"
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mat-menu defaults to role="menu", but this popup behaves like a dialog (focus trap, form controls). To avoid screen readers announcing it as a menu (and potentially reading the whole contents as one item), consider aligning with the existing pattern in search-widget-chip.component.html: set the mat-menu to role="presentation" and set the focus-trapped container to role="dialog" with an aria-labelledby pointing at the title element (instead of relying on menu semantics).

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +32
[attr.aria-label]="category?.name | translate"
(click)="$event.stopPropagation()"
(keyup.enter)="$event.stopPropagation()"
(keydown.tab)="$event.stopPropagation()"
class="adf-filter-container adf-filter-fieldset"
>
<legend class="adf-filter-title">{{ category?.name | translate }}</legend>
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fieldset currently has both an aria-label and a <legend> containing the same title. This can lead to duplicate/odd announcements in some screen readers and makes the labeling harder to reason about. Prefer a single source of truth by using aria-labelledby (referencing the legend) or dropping the redundant label.

Suggested change
[attr.aria-label]="category?.name | translate"
(click)="$event.stopPropagation()"
(keyup.enter)="$event.stopPropagation()"
(keydown.tab)="$event.stopPropagation()"
class="adf-filter-container adf-filter-fieldset"
>
<legend class="adf-filter-title">{{ category?.name | translate }}</legend>
[attr.aria-labelledby]="'filter-legend-' + category?.id"
(click)="$event.stopPropagation()"
(keyup.enter)="$event.stopPropagation()"
(keydown.tab)="$event.stopPropagation()"
class="adf-filter-container adf-filter-fieldset"
>
<legend class="adf-filter-title" [id]="'filter-legend-' + category?.id">
{{ category?.name | translate }}
</legend>

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +27
<fieldset
#filterContainer
tabindex="0"
[attr.aria-label]="category?.name | translate"
(click)="$event.stopPropagation()"
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is meant to fix a screen-reader announcement issue, but there’s no unit test asserting the popup container’s accessible semantics (e.g., that it’s labelled by the title / has the expected role). Since this component already has an Accessibility test section, please add an assertion to cover the intended a11y behavior to prevent regressions.

Copilot generated this review using guidance from repository custom instructions.
@AleksanderSklorz
Copy link
Copy Markdown
Contributor

@dominikiwanekhyland as per new standards - please address all copilot's comments. By addressing I mean - push code with fix and answer/close comment. If any comment is invalid then just answer to that comment and close it.

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.

3 participants