You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The icon-only "clear" button in the canvas Toolbox search field has no accessible name. Its only child is an aria-hidden "x" icon and it carries no aria-label, so screen readers announce it as an unnamed "button" — a WCAG 2.1 SC 4.1.2 (Name, Role, Value) failure.
The fix adds an optional clearButtonLabel prop to SearchBox (default 'Clear search'), applied as the button's aria-label, and has Toolbox supply a localized value through the package's existing LinguiJS pattern. The default keeps any direct SearchBox consumer accessible even without passing the prop, so it's fixed at the source and covers every reuse of the component.
Changes
SearchBox.tsx: new optional clearButtonLabel?: string prop (default 'Clear search'), rendered as aria-label on <button className="searchbox-clear">.
Toolbox.tsx: clearSearchLabel = _({ id: 'toolbox.search.clear', message: 'Clear search' }) (mirrors the existing searchPlaceholder line via useSafeLingui) passed to SearchBox.
SearchBox.test.tsx: new co-located Vitest suite asserting the clear button's accessible name (default and custom), and that it isn't rendered when the field is empty.
src/canvas/locales/en.json: added source string "toolbox.search.clear": "Clear search" (English source only — matches how prior canvas keys were added, e.g. commit f26195f5; the localization pipeline fills the other locales, and the baked-in message default renders English until then).
Verification
Rendered in this repo's Storybook and scanned with axe-core 4.11.0 (the same engine @storybook/addon-a11y uses), on story Apollo React/Canvas/Components/Controls/Toolbox → Default with the search field populated so the clear button renders:
Before (base main):
axe button-name: 1 critical violation on .searchbox-clear — "Buttons must have discernible text… aria-label attribute does not exist or is empty."
Chrome accessibility tree: button with no accessible name.
Storybook (before)
Clear button zoom (before)
After (this branch):
axe button-name: 0 violations, 1 pass on .searchbox-clear.
Chrome accessibility tree: button "Clear search".
Storybook (after)
Clear button zoom (after)
The only behavioral change is an added aria-label; no layout or visual impact. The new prop is additive and optional with a safe default — no breaking change.
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Improves Canvas toolbox search accessibility by giving the icon-only “clear” button a stable accessible name, while keeping the change additive and localized for Toolbox.
Changes:
Added clearButtonLabel?: string to SearchBox with a safe default ("Clear search"), applied via aria-label on the clear button.
Updated Toolbox to pass a localized clear-label using the existing useSafeLingui pattern and a new toolbox.search.clear message id.
Added Vitest coverage to assert the clear button’s accessible name (default + custom) and that the button is not rendered when the input is empty.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File
Description
packages/apollo-react/src/canvas/locales/en.json
Adds the toolbox.search.clear English source string used by Toolbox.
Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
Package
Coverage
New-line coverage
Packed (gzip)
Unpacked
vs main
@uipath/apollo-core
9.0%
—
43.82 MB
57.31 MB
±0
@uipath/apollo-react
37.2%
100.0% (1/1)
7.38 MB
28.15 MB
+307 B
@uipath/apollo-wind
40.3%
—
395.2 KB
2.57 MB
+19 B
@uipath/ap-chat
85.8%
—
43.43 MB
55.92 MB
−2 B
"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.
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
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.
Important
🦾 Part of the Case Management accessibility effort automated burndown
The icon-only "clear" button in the canvas
Toolboxsearch field has no accessible name. Its only child is anaria-hidden"x" icon and it carries noaria-label, so screen readers announce it as an unnamed "button" — a WCAG 2.1 SC 4.1.2 (Name, Role, Value) failure.The fix adds an optional
clearButtonLabelprop toSearchBox(default'Clear search'), applied as the button'saria-label, and hasToolboxsupply a localized value through the package's existing LinguiJS pattern. The default keeps any directSearchBoxconsumer accessible even without passing the prop, so it's fixed at the source and covers every reuse of the component.Changes
SearchBox.tsx: new optionalclearButtonLabel?: stringprop (default'Clear search'), rendered asaria-labelon<button className="searchbox-clear">.Toolbox.tsx:clearSearchLabel = _({ id: 'toolbox.search.clear', message: 'Clear search' })(mirrors the existingsearchPlaceholderline viauseSafeLingui) passed toSearchBox.SearchBox.test.tsx: new co-located Vitest suite asserting the clear button's accessible name (default and custom), and that it isn't rendered when the field is empty.src/canvas/locales/en.json: added source string"toolbox.search.clear": "Clear search"(English source only — matches how prior canvas keys were added, e.g. commitf26195f5; the localization pipeline fills the other locales, and the baked-inmessagedefault renders English until then).Verification
Rendered in this repo's Storybook and scanned with axe-core 4.11.0 (the same engine
@storybook/addon-a11yuses), on story Apollo React/Canvas/Components/Controls/Toolbox → Default with the search field populated so the clear button renders:Before (base
main):button-name: 1 critical violation on.searchbox-clear— "Buttons must have discernible text… aria-label attribute does not exist or is empty."buttonwith no accessible name.After (this branch):
button-name: 0 violations, 1 pass on.searchbox-clear.button "Clear search".The only behavioral change is an added
aria-label; no layout or visual impact. The new prop is additive and optional with a safe default — no breaking change.Should fix MST-12402 and probably others.
🤖 Generated with Claude Code