Skip to content

Commit

Permalink
Remove role attribute from recharts-wrapper (#4386)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

<!--- Describe your changes in detail -->

Before this PR, there was a `role` attribute on both the
`.recharts-wrapper` parent DIV, as well as the SVG element. This is
unnecessary, since the SVG element is enough. That extra role also
caused problems, as I outlined in
#4384

This PR removes the `role` attribute from the `.recharts-wrapper`
element. The SVG element still retains its role.

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
#4384

<!--- Why is this change required? What problem does it solve? -->

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] I have added a storybook story or extended an existing story to
show my changes
  • Loading branch information
julianna-langston authored and Coltin Kifer committed Apr 3, 2024
1 parent 25c8bbd commit db1e020
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/chart/generateCategoricalChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2252,7 +2252,6 @@ export const generateCategoricalChart = ({
ref={(node: HTMLDivElement) => {
this.container = node;
}}
role={attrs.role ?? 'region'}
>
<Surface {...attrs} width={width} height={height} title={title} desc={desc} style={FULL_WIDTH_AND_HEIGHT}>
{this.renderClipPath()}
Expand Down

0 comments on commit db1e020

Please sign in to comment.