base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[avatar] Add `aria-hidden` to `AvatarFallback`

Open battaglr opened this issue 1 month ago β€’ 2 comments

Rationale

AvatarFallback is purely presentational and doesn’t convey meaningful information. Marking it with aria-hidden="true" prevents redundant or confusing announcements.

When an avatar is used inside an interactive element (e.g., a button or link), that element (I think) should provide an accessible name using aria-label or a similar attribute.

Concerns / Questions

Are there cases where the avatar fallback is the only identifier for an entity (user, group, etc.)?

If so, should aria-hidden be applied, depending on whether an aria-label is present?

battaglr avatar Oct 30 '25 02:10 battaglr

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3095
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3095

commit: 5df07ba

pkg-pr-new[bot] avatar Oct 30 '25 02:10 pkg-pr-new[bot]

Deploy Preview for base-ui ready!

Name Link
Latest commit 5df07bab75f0b03c1e72722150d0810223a73c5e
Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6902d32ec2ba8a0008d5ab42
Deploy Preview https://deploy-preview-3095--base-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Oct 30 '25 02:10 netlify[bot]