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

[Bug] Aria label for series-custom is displayed in wrong language #18054

Closed
alexjcook opened this issue Dec 12, 2022 · 1 comment · Fixed by #19239
Closed

[Bug] Aria label for series-custom is displayed in wrong language #18054

alexjcook opened this issue Dec 12, 2022 · 1 comment · Fixed by #19239
Labels
accessibility bug en This issue is in English i18n

Comments

@alexjcook
Copy link

alexjcook commented Dec 12, 2022

Version

5.4.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=custom-bar-trend

Steps to Reproduce

  1. Visit the echarts example for Custom Bar Trend:
    https://echarts.apache.org/examples/en/editor.html?c=custom-bar-trend
  2. Toggle "Decal Pattern" to true (which automatically sets aria.label.enabled to true)
  3. Use firefox accessibility tab to view the generated aria description for the chart

Current Behavior

The generated aria description starts with
"This is a chart. It consists of 8 series count. The 0 series is a 自定义图 representing trend."

Expected Behavior

The aria description should be generated in the user's local language.
"This is a chart. It consists of 8 series count. The 0 series is a custom series representing trend."

Environment

- OS: Windows 10
- Browser: Firefox 107, 64-bit
- Framework: N/A

Any additional comments?

Ideally for a custom series we could define our own aria description to describe what is rendered, instead of "custom".
For the above example the custom series is rendered as a line, so it would be great if we could configure an aria-related option on the series so the following description could be generated
"This is a chart. It consists of 8 series count. The 0 series is a line representing trend."

@alexjcook alexjcook added the bug label Dec 12, 2022
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Dec 12, 2022
@plainheart plainheart added accessibility i18n and removed pending We are not sure about whether this is a bug/new feature. labels Dec 12, 2022
@plainheart
Copy link
Member

@Ovilia It seems the fallback series type name is hard-coded as 自定义图. It should be able to be translated in each locale file.
https://github.com/apache/echarts/blob/master/src/visual/aria.ts#L267

@plainheart plainheart added this to the 5.5.0 milestone Dec 12, 2022
@plainheart plainheart linked a pull request Oct 25, 2023 that will close this issue
8 tasks
@plainheart plainheart removed this from the 5.5.0 milestone Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility bug en This issue is in English i18n
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants