Insights: Accessible chart item click handling
Proposal
As a follow-up to #372215 (comment 1655230177), let's make clicking on the chart items accessible according to Pajamas' link accessibility guidelines.
Possible Solutions
- Use the
isMetaClick
util and pass ECharts's click event to it, then pass it to thevisitUrl
util'sexternal
argument so the drill-through page opens in a new tab. - To handle middle/scroll-wheel clicking, consider listening to EChart's
mousedown
event instead of thechartItemClicked
custom event baked into the chart components bygitlab-ui
– as of 2023-11-21, EChart'sclick
event only seems to recognize the left mouse button.
Edited by Rudy Crespo