xr0master/chartjs-react

ARIA role is invalid

Opened this issue · 1 comments

The element has a role attribute with a value of "chart", which isn't a valid recognized value such as those in https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles .

Some accessibility detection tools, such as Accessible Web Helper v1.19.6, flag this as a violation of "WCAG 2.0 A · SUCCESS CRITERIA 4.1.2".

A good solution might be to accept role as a parameter to <ReactChart> and pass it through to <canvas>.

The value cannot be invalid since this attribute does not have a set of valid values. However, there are well-known values ​​and guidelines for custom values.

I think it can be changed to graphics-document value.
https://www.w3.org/TR/graphics-aria-1.0/