Skip to content

fix: improve accessibility in FilterSearch and Facets (v2.2.0)#638

Merged
k-gerner merged 10 commits intomainfrom
dolce-gabbana-accessibility-2.1.2
Mar 9, 2026
Merged

fix: improve accessibility in FilterSearch and Facets (v2.2.0)#638
k-gerner merged 10 commits intomainfrom
dolce-gabbana-accessibility-2.1.2

Conversation

@k-gerner
Copy link
Contributor

@k-gerner k-gerner commented Feb 26, 2026

Changes:

  • added optional region landmark semantics to FilterSearch
  • root FilterSearch container now conditionally gets role="region" and aria-label when a region label is available, set via resultsRegionAriaLabel prop
  • added optional showOptionsSearchInputLabel prop to StandardFacetProps and StaticFiltersProps, which is disabled by default. When set to true, the search bar (when present) for these components will have an additional label, of the form "Search {{title}} Options".
  • added role="group" and respective aria-labeledby attribute to filter search dropdown results when the results are sectioned

J=WAT-5415
TEST=auto

@k-gerner k-gerner requested a review from a team as a code owner February 26, 2026 20:12
@k-gerner k-gerner changed the title fix: improve accessibility groupings in FilterSearch and FilterGroups (v2.1.2) fix: improve accessibility groupings in FilterSearch and FilterGroups (v2.1.3) Mar 4, 2026
Fondryext
Fondryext previously approved these changes Mar 5, 2026
@Fondryext
Copy link
Contributor

Fondryext commented Mar 5, 2026

May be worth quickly double-checking coverage failures, even if likely unrelated to the change itself

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Current unit coverage is 88.89799262597296%
Current visual coverage is 69.82851018220794%
Current combined coverage is 91.92122186495178%

@coveralls
Copy link

coveralls commented Mar 6, 2026

Coverage Status

coverage: 84.613% (+0.09%) from 84.527%
when pulling be6f40a on dolce-gabbana-accessibility-2.1.2
into 4c4c0be on main.

Fondryext
Fondryext previously approved these changes Mar 6, 2026
@k-gerner k-gerner changed the title fix: improve accessibility groupings in FilterSearch and FilterGroups (v2.1.3) fix: improve accessibility groupings in FilterSearch and Facets (v2.1.3) Mar 6, 2026
@k-gerner k-gerner changed the title fix: improve accessibility groupings in FilterSearch and Facets (v2.1.3) fix: improve accessibility groupings in FilterSearch and Facets (v2.2.0) Mar 6, 2026
@k-gerner k-gerner changed the title fix: improve accessibility groupings in FilterSearch and Facets (v2.2.0) fix: improve accessibility in FilterSearch and Facets (v2.2.0) Mar 6, 2026
@k-gerner k-gerner merged commit 91a6f0b into main Mar 9, 2026
22 checks passed
k-gerner added a commit that referenced this pull request Mar 9, 2026
* feat: allow users to turn analytics on and off (v2.1.0) (#632)

* feat: allow users to turn analytics on and off (v2.1.0)

This PR adds a new property to the SearchAnalyticsConfig, which
can be used to start with analytics enabled or disabled by
default. Three new methods are added to the analytics object-
two to turn analytics on/off, and one to get the current enabled
status.

J=WAT-5404
TEST=auto, manual

Ran test site locally with debugging and buttons to turn
analytics on and off, saw expected behavior.

* Update various names to be in-line with pages code

* Automated update to repo's documentation from github action

* Add enableYextAnalytics function to window

* drop unneeded parens

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* release: v2.1.0

* More accessbilities fixes for autocomplete results (#635)

* More accessbilities fixes for autocomplete results

Associate the visible label with the input via `label` + `htmlFor`, and wire `DropdownInput` with `inputId` and `aria-labelledby`.

Change the instructions container from `hidden` to `sr-only`, so `aria-describedby` references content that is actually exposed to screen readers.

J=WAT-5357
TEST=manual

tested with voice over enabled on test-site

* Update snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* release: v2.1.1

* chore: suppress error/warning spam, fix key errors etc (#642)

* fix: point TypeScript output to dist directory (#644)

* suppress error/warning spam, fix key errors etc

* set ts output dir to dist

* retry logic to WCAG

* release: v2.1.2

* fix: improve accessibility in FilterSearch and Facets (v2.2.0) (#638)

* fix linting; added optional region landmark semantics to FilterSearch

* Automated update to repo's documentation from github action

* chore: suppress error/warning spam, fix key errors etc (#642)

* fix: point TypeScript output to dist directory (#644)

* suppress error/warning spam, fix key errors etc

* set ts output dir to dist

* retry logic to WCAG

* release: v2.1.2

* revert fieldset legend accessibility change

* Automated update to repo's documentation from github action

* optional toggle to show label on facet/static filter searchable sections; update locales

* add group section semantics to filter search results when multiple sections

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Fondryext <160865254+Fondryext@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jacob Fondriest <jfondriest@yext.com>
Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com>
Co-authored-by: anguyen-yext2 <anguyen@yext.com>
Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com>
Co-authored-by: Kyle Gerner <kgerner@yext.com>
k-gerner added a commit that referenced this pull request Mar 9, 2026
* feat: allow users to turn analytics on and off (v2.1.0) (#632)

* feat: allow users to turn analytics on and off (v2.1.0)

This PR adds a new property to the SearchAnalyticsConfig, which
can be used to start with analytics enabled or disabled by
default. Three new methods are added to the analytics object-
two to turn analytics on/off, and one to get the current enabled
status.

J=WAT-5404
TEST=auto, manual

Ran test site locally with debugging and buttons to turn
analytics on and off, saw expected behavior.

* Update various names to be in-line with pages code

* Automated update to repo's documentation from github action

* Add enableYextAnalytics function to window

* drop unneeded parens

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* release: v2.1.0

* More accessbilities fixes for autocomplete results (#635)

* More accessbilities fixes for autocomplete results

Associate the visible label with the input via `label` + `htmlFor`, and wire `DropdownInput` with `inputId` and `aria-labelledby`.

Change the instructions container from `hidden` to `sr-only`, so `aria-describedby` references content that is actually exposed to screen readers.

J=WAT-5357
TEST=manual

tested with voice over enabled on test-site

* Update snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* release: v2.1.1

* chore: suppress error/warning spam, fix key errors etc (#642)

* fix: point TypeScript output to dist directory (#644)

* suppress error/warning spam, fix key errors etc

* set ts output dir to dist

* retry logic to WCAG

* release: v2.1.2

* fix: improve accessibility in FilterSearch and Facets (v2.2.0) (#638)

* fix linting; added optional region landmark semantics to FilterSearch

* Automated update to repo's documentation from github action

* chore: suppress error/warning spam, fix key errors etc (#642)

* fix: point TypeScript output to dist directory (#644)

* suppress error/warning spam, fix key errors etc

* set ts output dir to dist

* retry logic to WCAG

* release: v2.1.2

* revert fieldset legend accessibility change

* Automated update to repo's documentation from github action

* optional toggle to show label on facet/static filter searchable sections; update locales

* add group section semantics to filter search results when multiple sections

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* hotfix: improve accessibility in FilterSearch (v2.2.0) (#649)

- make sure autocomplete option count is announced when the input is cleared too
- detect all stale state value usages when using React.useState and fix to use a functional state update (eg setValue(value + 1) becomes setValue(prev => prev + 1))

* chore: update svgo and storybook (#651)

* release: v2.2.0

---------

Co-authored-by: Fondryext <160865254+Fondryext@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jacob Fondriest <jfondriest@yext.com>
Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com>
Co-authored-by: anguyen-yext2 <anguyen@yext.com>
Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com>
Co-authored-by: Kyle Gerner <kgerner@yext.com>
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.

4 participants