Description
Hello there, I was looking at the LineChart and found the following accessibility issues (especially regarding the screen reader's user experience).
- The tooltip text content is not read by the screen reader when hovering the data points with the mouse, or when navigating with keyboard arrows (It might be because
StreamXYFrame re-renders on mousemove and keydown, thus the div bearing the aria-live attribute is re-created while live region elements must already be in the DOM when the content changes). On Chrome nothing happens, on Firefox the SR reads "XY Chart" for each data point.
- When navigating with the SR,
AccessibleDataTable appears and is read through even if the trigger button was not clicked. SR users have to go through the table no matter what.
AccessibleDataTable shows values X/Y in pixels, and not the data itself. I don't know if pixels could be of any use for users, so I guess it's a bug. I also think that the data table should show (or give access to) the whole data and not only the first 5 lines, otherwise I don't see the use for that table.
I used Voiceover along with Google Chrome 148.0.7778.179 & Firefox 148.0 on MacOS 26.3.1.
Steps to reproduce
import { LineChart } from "semiotic/xy"
const data = [
{ month: 1, sales: 4200 },
{ month: 2, sales: 5100 },
{ month: 3, sales: 6800 },
{ month: 4, sales: 5900 },
{ month: 5, sales: 7200 },
{ month: 6, sales: 8100 },
{ month: 7, sales: 9100 },
{ month: 8, sales: 2100 },
{ month: 9, sales: 3100 },
]
export function Chart() {
return (
<LineChart
data={data}
xAccessor="month"
yAccessor="sales"
xLabel="Month"
yLabel="Sales ($)"
/>
)
}
Semiotic version
3.6.0
React version
19.2.6
Component
LineChart
Description
Hello there, I was looking at the LineChart and found the following accessibility issues (especially regarding the screen reader's user experience).
StreamXYFramere-renders onmousemoveandkeydown, thus the div bearing the aria-live attribute is re-created while live region elements must already be in the DOM when the content changes). On Chrome nothing happens, on Firefox the SR reads "XY Chart" for each data point.AccessibleDataTableappears and is read through even if the trigger button was not clicked. SR users have to go through the table no matter what.AccessibleDataTableshows values X/Y in pixels, and not the data itself. I don't know if pixels could be of any use for users, so I guess it's a bug. I also think that the data table should show (or give access to) the whole data and not only the first 5 lines, otherwise I don't see the use for that table.I used Voiceover along with Google Chrome 148.0.7778.179 & Firefox 148.0 on MacOS 26.3.1.
Steps to reproduce
Semiotic version
3.6.0
React version
19.2.6
Component
LineChart