Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set alt="" for Avatar #1599

Open
ogonkov opened this issue May 21, 2024 · 5 comments
Open

Not possible to set alt="" for Avatar #1599

ogonkov opened this issue May 21, 2024 · 5 comments
Labels
component: UserAvatar enhancement New feature or request help wanted Extra attention is needed

Comments

@ogonkov
Copy link
Contributor

ogonkov commented May 21, 2024

I can't set alt to empty string, because it trying to fallback to title

alt={props.alt || title}

@amje
Copy link
Contributor

amje commented May 23, 2024

@ogonkov Images with empty strings in alt attribute are not accessible. Why you want it?

@ogonkov
Copy link
Contributor Author

ogonkov commented May 23, 2024

It has presentation role, this is valid usage

@amje
Copy link
Contributor

amje commented May 24, 2024

It has presentation role, this is valid usage

Has it? We don't allow set this prop

@ogonkov
Copy link
Contributor Author

ogonkov commented May 24, 2024

Yes. In some cases you don't want to expose image to a11y technologies.

In case of avatar this could be the case when it followed by user name, for example and setting alt text for avatar is obsolete.

@amje amje added the enhancement New feature or request label Jun 14, 2024
@amje
Copy link
Contributor

amje commented Jun 18, 2024

@ogonkov We decided to remove alt prop entirely from the component props

@amje amje added the help wanted Extra attention is needed label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: UserAvatar enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants