Skip to content

fix(apollo-react): add aria-label to suggestion navigator chevrons - #1104

Open
abegu wants to merge 1 commit into
UiPath:mainfrom
abegu:fix/suggestion-navigator-aria-label
Open

fix(apollo-react): add aria-label to suggestion navigator chevrons#1104
abegu wants to merge 1 commit into
UiPath:mainfrom
abegu:fix/suggestion-navigator-aria-label

Conversation

@abegu

@abegu abegu commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • The chevron-up/chevron-down icon buttons in SuggestionGroupNavigator (packages/apollo-react/src/canvas/components/AgentCanvas/components/SuggestionGroupPanel.tsx) had no accessible name at all — their only content is a decorative Lucide icon (chevron-up/chevron-down), which contributes nothing to the accessible name.
  • Screen reader users focusing these controls got no indication of what "previous suggestion" / "next suggestion" navigation they performed.
  • Confirmed this is unfixed as of main (not just the pinned 6.20.1 a downstream consumer had) before filing.

Changes

  • Added aria-label="Previous suggestion" / aria-label="Next suggestion" to the two navigator Buttons.
  • Added SuggestionGroupPanel.test.tsx (new file — none existed for this component) covering: empty-state renders nothing, both buttons expose accessible names, both buttons invoke their respective callbacks, and the position counter renders correctly.

Test plan

  • vitest run on the new test file — 4/4 passing
  • biome check — clean
  • tsc --noEmit — no new errors

Source

Found while investigating a WCAG 2.4.6 report (PC-4063) filed against a downstream product consuming this package — the bug turned out to be upstream here, not in the consumer.

Copilot AI lite review requested due to automatic review settings August 31, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Pull request overview

This PR improves accessibility in apollo-react’s AgentCanvas suggestion navigation by giving icon-only chevron buttons an accessible name, and adds unit tests to prevent regressions.

Changes:

  • Added aria-label="Previous suggestion" / aria-label="Next suggestion" to the two icon-only navigator buttons in SuggestionGroupNavigator.
  • Added SuggestionGroupPanel.test.tsx covering empty state, button accessible names, callback invocation, and the position counter.
File summaries
File Description
packages/apollo-react/src/canvas/components/AgentCanvas/components/SuggestionGroupPanel.tsx Adds aria-labels to the previous/next chevron icon buttons so they have accessible names.
packages/apollo-react/src/canvas/components/AgentCanvas/components/SuggestionGroupPanel.test.tsx Introduces unit tests validating the empty render, accessible button names, navigation callbacks, and “N of M” counter rendering.
Review details
  • Files reviewed: 2/2 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.

The chevron-up/chevron-down icon buttons in SuggestionGroupNavigator
(canvas AgentCanvas suggestion group panel) had no accessible name at
all, since their only content is a decorative Lucide icon. Screen
reader users had no way to tell what the previous/next controls did.

Reported as PC-4063 against a downstream consumer (WCAG 2.4.6).
Copilot AI review requested due to automatic review settings September 1, 2026 09:34
@abegu
abegu force-pushed the fix/suggestion-navigator-aria-label branch from 8598c55 to afdee4f Compare September 1, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

2 participants