Skip to content

Apply AriaAttributes to Sunburst chart - #2841

Merged
plouc merged 1 commit into
plouc:masterfrom
mahirhir:feat/sunburst-aria-attributes
Jun 29, 2026
Merged

Apply AriaAttributes to Sunburst chart#2841
plouc merged 1 commit into
plouc:masterfrom
mahirhir:feat/sunburst-aria-attributes

Conversation

@mahirhir

Copy link
Copy Markdown
Contributor

Follow-up to #2823, which added ariaLabel / ariaLabelledBy / ariaDescribedBy to the Pie chart.

Sunburst defaults role to 'img' but doesn't accept the aria props, so the rendered <svg role="img"> has no way to receive an accessible name. SvgWrapper already forwards these attributes for the other charts (Bar, Line, Radar, Pie, etc.); Sunburst just wasn't passing them through.

This wires the same three props from InnerSunburst to SvgWrapper, matching the existing charts.

  • packages/sunburst/src/types.ts: add the three optional props to SunburstCommonProps
  • packages/sunburst/src/Sunburst.tsx: forward them to SvgWrapper
  • packages/sunburst/tests/Sunburst.test.tsx: assert they reach the root <svg> (same shape as the Radar accessibility test)

@plouc
plouc merged commit 76bded6 into plouc:master Jun 29, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants