Skip to content

[avatar] Inappropriate role #1614

@rolfsmeds

Description

@rolfsmeds

vaadin-avatar has role="button" by default, which indicates to screen readers that it is clickable, even though it is not interactive by default, nor does it have features to make it interactive (other than the possibility to attach clicklisteners that it shares with any other element).

A more appropriate default role would be role="img", with the exception of the overflow avatar in AvatarGroup, which should remain a button as it's clickable.

If collaboration engine uses the component in a way that makes it clickable, the role should probably be overriden back to "button". Consider introducing an API for setting the role.

Metadata

Metadata

Assignees

Labels

a11yAccessibility issuebugSomething isn't workingvaadin-avatar

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions