Skip to content

Accessibility issue: <svg> elements with an img role must have an alternative text #474

Open
@nali-github

Description

@nali-github

Provide a general summary of the issue here

We got accessibility ticket when rendering chart as svg: <svg> elements with an img role must have an alternative text
axe DevTools complains

🤔 Expected Behavior?

Can add aria-label to the components

😯 Current Behavior

Unable to add aria-label to the components

💁 Possible Solution

No response

🔦 Context

Here is the implementation. I tried to add a description prop to Chart level in RSC, it's added to the top div. The Bar component doesn't support description prop.

Based on axe DevTools, the aria-label needed to add to 2 lower level elements:
rsc

🖥️ Steps to Reproduce

Storybook link here .
Scan using the axe DevTools can see the problem.

Version

1.15.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions