Skip to content

[Bug] ECharts claims to be accessible, but is not keyboard accessible #18585

Closed as not planned

Description

@kpierro914

Version

5.4.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=doc-example%2Faria-decal-simple&edit=1&reset=1

Steps to Reproduce

  1. Visited the demo site and tested multiple chart types with a screen reader in preparation for my company to start using ECharts.
  2. Added the following to the options object of the specific chart in the link in the aria section and saw that no role was being added to the main div (same div the label is added to)
    label: {description: 'this is a custom label where we can inform users of screen readers to navigate or engage or enable the alternative'}

Current Behavior

When an aria label is applied to a chart, no role is given to the main div.

Expected Behavior

Since it is extremely difficult to make SVG's & canvas' keyboard accessible, the short term approach should be when an aria label is applied to any chart, role="img" should also be applied to the main div.

A long term approach may be considered when rendering as an SVG to meet the WCAG 2.1 guidelines (this is different from the ARIA standard). Both are critical to web accessibility.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Activity

  1. added
    en
    pending
    on May 2, 2023
  2. helgasoft commented on May 2, 2023

    @helgasoft

    it is extremely difficult to make SVG's & canvas' keyboard accessible

    not that difficult actually, see #14706

  3. kpierro914 commented on May 3, 2023

    @kpierro914
    Author

    The canvas element has support in all browsers and will render on screen but the canvas content will not be accessible to screen readers. With canvas the accessibility has to be added with JavaScript or ARIA on the canvas element itself or using internal fallback content placed within the opening and closing canvas tag. Canvas content is not part of the DOM except for the fallback content.

    SVG is a better choice for interactive content and custom controls than Canvas because SVG has internal accessibility semantics and ability to easily add interactivity with JavaScript.

    So, how exactly is this easily done? The other thread doesn’t really explain it. It looks like they added key listeners for certain keys and read things aloud to the user when those keys are pressed, but that’s not an all inclusive solution. Some screen reader users are also deaf.

  4. julianna-langston commented on Jan 16, 2024

    @julianna-langston

    Hi! I'm one of the developers of chart2music, the library referenced in the other thread.

    It looks like they added key listeners for certain keys and read things aloud to the user when those keys are pressed, but that’s not an all inclusive solution. Some screen reader users are also deaf.

    Chart2Music was designed from the ground up to work for all screen reader users. While Chart2Music produces sound, it also leverages the screen reader to "read" out individual values in a chart. (Deaf-blind screen reader users typically use a brailler to physically read what a screen reader is saying, so those users will be able to get those raw data values.)

    While the library is optimized for hearing blind users, it still surfaces information to deaf-blind users.

  5. github-actions commented on Jan 15, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

  6. added
    stale
    on Jan 15, 2026
  7. github-actions commented on Jan 22, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenpendingstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions