Skip to content

[charts][accessibility] Fix out of bounds keyboard navigation#23180

Merged
JCQuintas merged 2 commits into
mui:masterfrom
silviuaavram:fix/charts-keyboard-navigation-out-of-bounds
Jul 20, 2026
Merged

[charts][accessibility] Fix out of bounds keyboard navigation#23180
JCQuintas merged 2 commits into
mui:masterfrom
silviuaavram:fix/charts-keyboard-navigation-out-of-bounds

Conversation

@silviuaavram

@silviuaavram silviuaavram commented Jul 20, 2026

Copy link
Copy Markdown
Member

Fixes #23179

Set the correct max index of a series whenever an arrow navigation is attempted. Whenever the end is reached, we return the current index.

@silviuaavram silviuaavram self-assigned this Jul 20, 2026
@silviuaavram silviuaavram added accessibility a11y scope: charts Changes related to the charts. labels Jul 20, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-23180--material-ui-x.netlify.app/
QR code for https://deploy-preview-23180--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 🔺+33B(+0.01%) 🔺+10B(+0.01%)
@mui/x-charts-pro 🔺+33B(+0.01%) 🔺+11B(+0.01%)
@mui/x-charts-premium 🔺+33B(+0.01%) 🔺+12B(+0.01%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,579.90 ms -212.46 ms(-11.9%) | Renders: 63 (+0) | Paint: 2,226.95 ms -329.55 ms(-12.9%)

Test Duration Renders
BarChart with big data amount 145.55 ms 🔺+96.00 ms(+193.8%) 2 (+0)
LineChart with big data amount (with marks) 102.02 ms 🔺+34.13 ms(+50.3%) 2 (+0)
ScatterChartPro with big data amount and zoomed in (batch renderer) 34.41 ms 🔺+22.41 ms(+186.8%) 2 (+0)
BarChartPro with big data amount 40.89 ms 🔺+7.22 ms(+21.5%) 2 (+0)
RadialBarChart stacked with multiple series 26.42 ms 🔺+6.54 ms(+32.9%) 2 (+0)

…and 7 more (+14 within noise) — details

Metric alarms

Test Metric Change
BarChart with big data amount bench:paint 🔺 +153.27 ms
LineChart with big data amount (with marks) bench:paint 🔺 +40.84 ms
BarChartPro with big data amount bench:paint 🔺 +24.45 ms
ScatterChartPro with big data amount (batch renderer) bench:paint 🔺 +4.71 ms
RadialLineChart with big data amount bench:paint 🔺 +25.31 ms

Check out the code infra dashboard for more information about this PR.

@silviuaavram silviuaavram added the type: bug It doesn't behave as expected. label Jul 20, 2026
@JCQuintas
JCQuintas merged commit 405a6de into mui:master Jul 20, 2026
22 checks passed
@silviuaavram
silviuaavram deleted the fix/charts-keyboard-navigation-out-of-bounds branch July 20, 2026 09:04
@alexfauquette

Copy link
Copy Markdown
Member

@JCQuintas Did you consider the case of line charts with different length?

For those it was expected to focus an index with no value to simplify the navigation between multiple line series sharing the same x-axis

@JCQuintas

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y scope: charts Changes related to the charts. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[charts] Crash when navigating out of bounds with Arrow Right

3 participants