Skip to content

[Bug]: avatar should render an alt tag even if no label is specified to avoid a11y violations. #5513

Open
@Rajdeepc

Description

@Rajdeepc

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

avatar

Expected behavior

<!-- After -->
<sp-avatar src="image.jpg"></sp-avatar>
<!-- Renders as: -->
<img class="image" alt="" src="image.jpg">

Actual behavior

<!-- Before -->
<sp-avatar src="image.jpg"></sp-avatar>
<!-- Rendered as: -->
<img class="image" src="image.jpg">

Screenshots

No response

What browsers are you seeing the problem in?

Microsoft Edge, Safari, Chrome, Firefox

How can we reproduce this issue?

  1. Go to https://opensource.adobe.com/spectrum-web-components/components/avatar/#sizes
  2. Remove label property
  3. Open Dev Console
  4. Check img doesnt have alt attribute

Sample code or abstract reproduction which illustrates the problem

No response

Severity

None

Logs taken while reproducing problem

No response

Would you like to track this issue in Jira?

  • Yes, please tell me the ticket number!

Metadata

Metadata

Assignees

Labels

a11yIssues related to accessibilitybugSomething isn't workingjira ticket createdtriageAn issue needing triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions