@react-magma/charts 14.0.0 → 15.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1590,18 +1590,10 @@ var CarbonChart = React.forwardRef(function (props, ref) {
1590
1590
  type: 'none',
1591
1591
  } }) }), (chartToolbar ? { toolbar: { enabled: false } } : {}));
1592
1592
  var ChartType = allCharts[type];
1593
- // Adding aria-label to main SVG container
1594
- React.useEffect(function () {
1595
- if (ariaLabel) {
1596
- document.querySelectorAll('.graph-frame ').forEach(function (div) {
1597
- div.setAttribute('aria-label', ariaLabel);
1598
- });
1599
- }
1600
- });
1601
1593
  var groupsLength = Object.keys(buildColors()).length;
1602
1594
  var showTable = (chartToolbar === null || chartToolbar === void 0 ? void 0 : chartToolbar.showAsTable) !== false;
1603
1595
  return (React.createElement(FullscreenRoot, { ref: mergedRef, isInverse: isInverse, theme: theme },
1604
- React.createElement(CarbonChartWrapper, __assign({ "data-testid": testId, isInverse: isInverse, theme: theme, className: "carbon-chart-wrapper".concat(chartToolbar ? ' has-magma-toolbar' : ''), groupsLength: groupsLength < 6 ? groupsLength : 14 }, rest),
1596
+ React.createElement(CarbonChartWrapper, __assign({ "data-testid": testId, isInverse: isInverse, theme: theme, className: "carbon-chart-wrapper".concat(chartToolbar ? ' has-magma-toolbar' : ''), groupsLength: groupsLength < 6 ? groupsLength : 14, role: "region", "aria-label": ariaLabel || chartTitle, "aria-roledescription": "chart" }, rest),
1605
1597
  React.createElement(ChartContentWrapper, null,
1606
1598
  chartToolbar && (React.createElement(CarbonChartToolbar, { config: chartToolbar, dataSet: dataSet, isInverse: isInverse, isTableOpen: isTableOpen, isFullscreen: isFullscreen, onOpenTable: openTableModal, onToggleFullscreen: toggleFullscreen, theme: theme, title: chartTitle, wrapperRef: internalRef })),
1607
1599
  React.createElement(ChartType, { data: dataSet, options: newOptions }))),