-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Closed
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in English
Description
Version
5.5.0
Link to Minimal Reproduction
Steps to Reproduce
To reproduce create a echart element and add the option:
aria: {
show: true,
},Current Behavior
<div id="app" _echarts_instance_="ec_1718374282536" aria-label="This is a chart with type Bar chart.The data is as follows: the data for Mon is 0, 120, the data for Tue is 1, 200, the data for Wed is 2, 150, the data for Thu is 3, 80, the data for Fri is 4, 70, the data for Sat is 5, 110, the data for Sun is 6, 130. " style="user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
<div style="position: relative; width: 400px; height: 300px; padding: 0px; margin: 0px; border-width: 0px; cursor: default;">
<canvas data-zr-dom-id="zr_0" width="400" height="300" style="position: absolute; left: 0px; top: 0px; width: 400px; height: 300px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0px; margin: 0px; border-width: 0px;"></canvas></div>
</div>It's said that it's not good practice to add aria-label attribute to a non-interative element (like tag div without a role).
To be honest I don't know if this a real issue for accesbility.
I used lighthouse to check. The div with the aria-label shows this warning:
Expected Behavior
To not fail ARIA test like lighthouse's
Environment
- OS:
- Browser:
- Framework:Any additional comments?
Solution could be:
Add a role to the div that receives the attribute aria-label.
Or maybe add the aria-label on the canvas or the svg?
To be honest I don't know if this a real issue for accesbility.
Metadata
Metadata
Assignees
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in English
