refactor(agent-icon): remove unused aria-label prop from presentational component - #5056
Open
pedrofrxncx wants to merge 1 commit into
Open
refactor(agent-icon): remove unused aria-label prop from presentational component#5056pedrofrxncx wants to merge 1 commit into
pedrofrxncx wants to merge 1 commit into
Conversation
…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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removed the
aria-labelprop fromAgentAvatarand 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-labelprop 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
aria-labelprop fromAgentAvatarPropsinterfacearia-labelparameter and usage fromIconAvatar,AgentAvatar, andAgentAvatarImagefunctionsVerification
bun run fmt— passedcd apps/mesh && bunx tsc --noEmit— no errorsbun test ./apps/mesh/src/web/components/agent-icon.test.tsx— 2 passgit grep AgentAvatar.*aria-label— no remaining usagesNet diff: -17 lines
Summary by cubic
Removed the unused
aria-labelprop fromAgentAvatar,IconAvatar, andAgentAvatarImageto 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.