Skip to content

refactor(agent-icon): remove unused aria-label prop from presentational component - #5056

Open
pedrofrxncx wants to merge 1 commit into
mainfrom
refactor/agent-icon-remove-unused-aria-label-w1
Open

refactor(agent-icon): remove unused aria-label prop from presentational component#5056
pedrofrxncx wants to merge 1 commit into
mainfrom
refactor/agent-icon-remove-unused-aria-label-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removed the aria-label prop from AgentAvatar and its internal components (IconAvatar, AgentAvatarImage). The component is purely presentational and should not accept accessibility labels — these should be applied to interactive parent elements (buttons, links) wrapping the avatar instead.

Why

The component accepted an aria-label prop but passed it to non-interactive div elements, which is semantically incorrect. No code was using this prop, so it was dead code. Parent components should handle accessibility labels on their own interactive elements.

Changes

  • Removed aria-label prop from AgentAvatarProps interface
  • Removed aria-label parameter and usage from IconAvatar, AgentAvatar, and AgentAvatarImage functions
  • No behavior change; tests pass

Verification

  • bun run fmt — passed
  • cd apps/mesh && bunx tsc --noEmit — no errors
  • bun test ./apps/mesh/src/web/components/agent-icon.test.tsx — 2 pass
  • git grep AgentAvatar.*aria-label — no remaining usages

Net diff: -17 lines


Summary by cubic

Removed the unused aria-label prop from AgentAvatar, IconAvatar, and AgentAvatarImage to match semantic HTML. The avatar is presentational, so labels belong on the interactive parent (button or link); no behavior change.

Written for commit 7587775. Summary will update on new commits.

Review in cubic

…al component

AgentAvatar is a presentational component and should not accept aria-label.
Accessibility labels belong on interactive parent elements (buttons, links),
not on the avatar itself. The prop was accepted but unused by any code.

- Remove aria-label from AgentAvatarProps, IconAvatar, and AgentAvatarImage
- No behavior change; all tests pass
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.

1 participant