fusioncharts-dist
fusioncharts-dist copied to clipboard
Accessibility Extension reports an error in the console and aria-label was added incorrectly
The accessibility extension reported the following error on the console:
This occurs when the data length of the later series in a scatter chart is less than the data length of the first series.
I noticed that this problem was fixed in @fusioncharts\accessibility\src\categories\multiSeries.js (as shown on the left in the screenshot below), but not in Accessibility Extension (as shown on the right in the screenshot below):
This also causes the aria-label to be added incorrectly, causing incorrect text to be announced by screen readers.
Such as in the screenshot below, the data length of the first series (red dots) is 3. Although the data length of the second series (black dots) is greater than 3, it is also incorrectly considered that there are only 3 plots, and only the first 3 points have been added aria-label:
Another example is the screenshot below. Although the third series (blue) has only one point, which is less than the 35 points of the first series (red), its aria-lable is also added with "Plot 1 of 35". The sentence in the black background in the screenshot below is the text announced by VoiceOver when the data plot in the red circle gets the focus.
Please note that this problem needs to be reproduced with a scatter type chart. The following example can reproduce the problem: https://codesandbox.io/s/accessibility-example-angular-forked-v2h0x4