@fluentui/react-charting 4.23.17 → 4.23.19

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.
@@ -21807,6 +21807,13 @@ var Arc = /** @class */ (function (_super) {
21807
21807
  _this._onBlur = function () {
21808
21808
  _this.props.onBlurCallback();
21809
21809
  };
21810
+ _this._getAriaLabel = function () {
21811
+ var _a;
21812
+ var point = _this.props.data.data;
21813
+ var legend = point.xAxisCalloutData || point.legend;
21814
+ var yValue = point.yAxisCalloutData || point.data || 0;
21815
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? legend + ", " : '') + (yValue + ".");
21816
+ };
21810
21817
  return _this;
21811
21818
  }
21812
21819
  Arc.getDerivedStateFromProps = function (nextProps) {
@@ -21829,7 +21836,7 @@ var Arc = /** @class */ (function (_super) {
21829
21836
  var opacity = this.props.activeArc === this.props.data.data.legend || this.props.activeArc === '' ? 1 : 0.1;
21830
21837
  return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("g", { ref: this.currentRef },
21831
21838
  !!focusedArcId && focusedArcId === id && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("path", { id: id + 'focusRing', d: arc(this.props.focusData), className: classNames.focusRing })),
21832
- react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("path", { id: id, d: arc(this.props.data), onFocus: this._onFocus.bind(this, this.props.data.data, id), className: classNames.root, "data-is-focusable": true, onMouseOver: this._hoverOn.bind(this, this.props.data.data), onMouseMove: this._hoverOn.bind(this, this.props.data.data), onMouseLeave: this._hoverOff, onBlur: this._onBlur, opacity: opacity, onClick: href ? this._redirectToUrl.bind(this, href) : (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.data.onClick, "aria-labelledby": this.props.calloutId, role: "text" }),
21839
+ react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("path", { id: id, d: arc(this.props.data), onFocus: this._onFocus.bind(this, this.props.data.data, id), className: classNames.root, "data-is-focusable": true, onMouseOver: this._hoverOn.bind(this, this.props.data.data), onMouseMove: this._hoverOn.bind(this, this.props.data.data), onMouseLeave: this._hoverOff, onBlur: this._onBlur, opacity: opacity, onClick: href ? this._redirectToUrl.bind(this, href) : (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.data.onClick, "aria-label": this._getAriaLabel(), role: "img" }),
21833
21840
  react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("text", { textAnchor: 'middle', className: classNames.insideDonutString, y: 5 }, this.props.valueInsideDonut)));
21834
21841
  };
21835
21842
  Arc.prototype._onFocus = function (data, id) {
@@ -22438,7 +22445,7 @@ var GroupedVerticalBarChartBase = /** @class */ (function (_super) {
22438
22445
  pointData.data &&
22439
22446
  singleGroup.push(react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { className: _this._classNames.opacityChangeOnHover, key: singleSet.indexNum + "-" + index, height: Math.max(yBarScale(pointData.data), 0), width: widthOfBar, x: xScale1(datasetKey), y: Math.max(containerHeight - _this.margins.bottom - yBarScale(pointData.data), 0), "data-is-focusable": !_this.props.hideTooltip, opacity: _this._getOpacity(pointData.legend), ref: function (e) {
22440
22447
  _this._refCallback(e, pointData.legend, refIndexNumber);
22441
- }, fill: pointData.color, onMouseOver: _this._onBarHover.bind(_this, pointData, singleSet), onMouseMove: _this._onBarHover.bind(_this, pointData, singleSet), onMouseOut: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, pointData, singleSet, refIndexNumber), onBlur: _this._onBarLeave, onClick: _this.props.href ? _this._redirectToUrl.bind(_this, _this.props.href) : pointData.onClick, "aria-labelledby": "toolTip" + _this._calloutId, role: "text" }));
22448
+ }, fill: pointData.color, onMouseOver: _this._onBarHover.bind(_this, pointData, singleSet), onMouseMove: _this._onBarHover.bind(_this, pointData, singleSet), onMouseOut: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, pointData, singleSet, refIndexNumber), onBlur: _this._onBarLeave, onClick: _this.props.href ? _this._redirectToUrl.bind(_this, _this.props.href) : pointData.onClick, "aria-label": _this._getAriaLabel(pointData, singleSet.xAxisPoint), role: "img" }));
22442
22449
  });
22443
22450
  // Used to display tooltip at x axis labels.
22444
22451
  if (!_this.props.wrapXAxisLables && _this.props.showXAxisLablesTooltip) {
@@ -22548,6 +22555,13 @@ var GroupedVerticalBarChartBase = /** @class */ (function (_super) {
22548
22555
  _this._yMax = Math.max(domainValue[domainValue.length - 1], _this.props.yMaxValue || 0);
22549
22556
  }
22550
22557
  };
22558
+ _this._getAriaLabel = function (point, xAxisPoint) {
22559
+ var _a;
22560
+ var xValue = point.xAxisCalloutData || xAxisPoint;
22561
+ var legend = point.legend;
22562
+ var yValue = point.yAxisCalloutData || point.data;
22563
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || xValue + ". " + legend + ", " + yValue + ".";
22564
+ };
22551
22565
  _this._createSet = Object(office_ui_fabric_react_lib_Utilities__WEBPACK_IMPORTED_MODULE_7__["memoizeFunction"])(function (data) { return _this._createDataSetOfGVBC(data); });
22552
22566
  _this.state = {
22553
22567
  color: '',
@@ -22823,11 +22837,9 @@ var HeatMapChartBase = /** @class */ (function (_super) {
22823
22837
  */
22824
22838
  _this._dataSet[yAxisDataPoint].forEach(function (dataPointObject, index2) {
22825
22839
  var id = "" + index1 + index2;
22826
- var rectElement = (react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("g", Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ key: id }, (_this.state.calloutId && {
22827
- 'aria-labelledby': "" + _this.state.calloutId,
22828
- }), { "data-is-focusable": true, fillOpacity: _this._getOpacity(dataPointObject.legend), transform: "translate(" + _this._xAxisScale(dataPointObject.x) + ", " + _this._yAxisScale(dataPointObject.y) + ")", ref: function (gElement) {
22840
+ var rectElement = (react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("g", { key: id, role: "img", "aria-label": _this._getAriaLabel(dataPointObject), "data-is-focusable": true, fillOpacity: _this._getOpacity(dataPointObject.legend), transform: "translate(" + _this._xAxisScale(dataPointObject.x) + ", " + _this._yAxisScale(dataPointObject.y) + ")", ref: function (gElement) {
22829
22841
  _this._rectRefCallback(gElement, id, dataPointObject);
22830
- }, onFocus: _this._onRectFocus.bind(_this, id, dataPointObject), onBlur: _this._onRectBlurOrMouseOut, onMouseOver: _this._onRectMouseOver.bind(_this, id, dataPointObject), onMouseOut: _this._onRectBlurOrMouseOut }),
22842
+ }, onFocus: _this._onRectFocus.bind(_this, id, dataPointObject), onBlur: _this._onRectBlurOrMouseOut, onMouseOver: _this._onRectMouseOver.bind(_this, id, dataPointObject), onMouseOut: _this._onRectBlurOrMouseOut },
22831
22843
  react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("rect", { fill: _this._colorScale(dataPointObject.value), width: _this._xAxisScale.bandwidth(), height: _this._yAxisScale.bandwidth(), onClick: dataPointObject.onClick }),
22832
22844
  react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("text", { dominantBaseline: 'middle', textAnchor: 'middle', className: _this._classNames.text, transform: "translate(" + _this._xAxisScale.bandwidth() / 2 + ", " + _this._yAxisScale.bandwidth() / 2 + ")" }, Object(_utilities_utilities__WEBPACK_IMPORTED_MODULE_8__["convertToLocaleString"])(dataPointObject.rectText, _this.props.culture))));
22833
22845
  rectangles.push(rectElement);
@@ -23166,6 +23178,16 @@ var HeatMapChartBase = /** @class */ (function (_super) {
23166
23178
  isCalloutVisible: false,
23167
23179
  });
23168
23180
  };
23181
+ _this._getAriaLabel = function (point) {
23182
+ var _a;
23183
+ var xValue = point.x;
23184
+ var yValue = point.y;
23185
+ var legend = point.legend;
23186
+ var zValue = point.ratio ? point.ratio[0] + "/" + point.ratio[1] : point.rectText || point.value;
23187
+ var description = point.descriptionMessage;
23188
+ return (((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) ||
23189
+ xValue + ", " + yValue + ". " + legend + ", " + zValue + "." + (description ? " " + description + "." : ''));
23190
+ };
23169
23191
  var _a = _this._getXandY(), x = _a.x, y = _a.y;
23170
23192
  _this._xAxisType = Object(_utilities_utilities__WEBPACK_IMPORTED_MODULE_8__["getTypeOfAxis"])(x, true);
23171
23193
  _this._yAxisType = Object(_utilities_utilities__WEBPACK_IMPORTED_MODULE_8__["getTypeOfAxis"])(y, false);
@@ -23357,6 +23379,13 @@ var HorizontalBarChartBase = /** @class */ (function (_super) {
23357
23379
  isCalloutVisible: false,
23358
23380
  });
23359
23381
  };
23382
+ _this._getAriaLabel = function (point) {
23383
+ var _a;
23384
+ var legend = point.xAxisCalloutData || point.legend;
23385
+ var yValue = point.yAxisCalloutData ||
23386
+ (point.horizontalBarChartdata ? point.horizontalBarChartdata.x + "/" + point.horizontalBarChartdata.y : 0);
23387
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? legend + ", " : '') + (yValue + ".");
23388
+ };
23360
23389
  _this.state = {
23361
23390
  isCalloutVisible: false,
23362
23391
  hoverValue: '',
@@ -23422,7 +23451,7 @@ var HorizontalBarChartBase = /** @class */ (function (_super) {
23422
23451
  if (p && p.onClick) {
23423
23452
  p.onClick();
23424
23453
  }
23425
- }, "aria-labelledby": _this._calloutId, role: "img", "aria-label": "Horizontal bar chart", "data-is-focusable": true, onBlur: _this._hoverOff, onMouseLeave: _this._hoverOff }, bars))))));
23454
+ }, role: "img", "aria-label": _this._getAriaLabel(points.chartData[0]), "data-is-focusable": true, onBlur: _this._hoverOff, onMouseLeave: _this._hoverOff }, bars))))));
23426
23455
  }),
23427
23456
  react__WEBPACK_IMPORTED_MODULE_1__["createElement"](office_ui_fabric_react_lib_Callout__WEBPACK_IMPORTED_MODULE_3__["Callout"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ target: this.state.refSelected, coverTarget: true, isBeakVisible: false, gapSpace: 30, hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible), directionalHint: office_ui_fabric_react_lib_Callout__WEBPACK_IMPORTED_MODULE_3__["DirectionalHint"].rightTopEdge, id: this._calloutId, onDismiss: this._closeCallout, preventDismissOnLostFocus: true }, this.props.calloutProps, Object(_utilities_index__WEBPACK_IMPORTED_MODULE_4__["getAccessibleDataObject"])(this.state.callOutAccessibilityData)),
23428
23457
  react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, this.props.onRenderCalloutPerHorizonalBar ? (this.props.onRenderCalloutPerHorizonalBar(this.state.barCalloutProps)) : (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_utilities_index__WEBPACK_IMPORTED_MODULE_4__["ChartHoverCard"], { Legend: this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend, YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.hoverValue, color: this.state.lineColor, culture: this.props.culture }))))));
@@ -25375,6 +25404,12 @@ var MultiStackedBarChartBase = /** @class */ (function (_super) {
25375
25404
  isCalloutVisible: false,
25376
25405
  });
25377
25406
  };
25407
+ _this._getAriaLabel = function (point) {
25408
+ var _a;
25409
+ var legend = point.xAxisCalloutData || point.legend;
25410
+ var yValue = point.yAxisCalloutData || point.data || 0;
25411
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? legend + ", " : '') + (yValue + ".");
25412
+ };
25378
25413
  _this.state = {
25379
25414
  isCalloutVisible: false,
25380
25415
  refArray: [],
@@ -25452,7 +25487,7 @@ var MultiStackedBarChartBase = /** @class */ (function (_super) {
25452
25487
  }
25453
25488
  return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("g", { key: index, className: point.placeHolder ? _this._classNames.placeHolderOnHover : _this._classNames.opacityChangeOnHover, ref: function (e) {
25454
25489
  _this._refCallback(e, point.legend);
25455
- }, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, pointData, color, point), onBlur: _this._onBarLeave, "aria-labelledby": _this._calloutId, role: "img", "aria-label": "Multi stacked bar chart", onMouseOver: point.placeHolder ? undefined : _this._onBarHover.bind(_this, pointData, color, point), onMouseMove: point.placeHolder ? undefined : _this._onBarHover.bind(_this, pointData, color, point), onMouseLeave: point.placeHolder ? undefined : _this._onBarLeave, onClick: href ? (point.placeHolder ? undefined : _this._redirectToUrl.bind(_this, href)) : point.onClick },
25490
+ }, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, pointData, color, point), onBlur: _this._onBarLeave, role: "img", "aria-label": _this._getAriaLabel(point), onMouseOver: point.placeHolder ? undefined : _this._onBarHover.bind(_this, pointData, color, point), onMouseMove: point.placeHolder ? undefined : _this._onBarHover.bind(_this, pointData, color, point), onMouseLeave: point.placeHolder ? undefined : _this._onBarLeave, onClick: href ? (point.placeHolder ? undefined : _this._redirectToUrl.bind(_this, href)) : point.onClick },
25456
25491
  react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { key: index, x: startingPoint[index] + '%', y: 0, width: value + '%', height: barHeight, fill: color })));
25457
25492
  });
25458
25493
  if (data.chartData.length === 0) {
@@ -25708,6 +25743,12 @@ var StackedBarChartBase = /** @class */ (function (_super) {
25708
25743
  isCalloutVisible: false,
25709
25744
  });
25710
25745
  };
25746
+ _this._getAriaLabel = function (point) {
25747
+ var _a;
25748
+ var legend = point.xAxisCalloutData || point.legend;
25749
+ var yValue = point.yAxisCalloutData || point.data || 0;
25750
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? legend + ", " : '') + (yValue + ".");
25751
+ };
25711
25752
  _this.state = {
25712
25753
  isCalloutVisible: false,
25713
25754
  selectedLegendTitle: '',
@@ -25855,7 +25896,7 @@ var StackedBarChartBase = /** @class */ (function (_super) {
25855
25896
  }
25856
25897
  return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("g", { key: index, className: _this._classNames.opacityChangeOnHover, ref: function (e) {
25857
25898
  _this._refCallback(e, legend.title);
25858
- }, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, pointData, color, point), onBlur: _this._onBarLeave, "aria-labelledby": _this._calloutId, "aria-label": "Stacked bar chart", role: "img", onMouseOver: _this._onBarHover.bind(_this, pointData, color, point), onMouseMove: _this._onBarHover.bind(_this, pointData, color, point), onMouseLeave: _this._onBarLeave, pointerEvents: "all", onClick: _this.props.href ? _this._redirectToUrl.bind(_this, _this.props.href) : point.onClick },
25899
+ }, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, pointData, color, point), onBlur: _this._onBarLeave, "aria-label": _this._getAriaLabel(point), role: "img", onMouseOver: _this._onBarHover.bind(_this, pointData, color, point), onMouseMove: _this._onBarHover.bind(_this, pointData, color, point), onMouseLeave: _this._onBarLeave, pointerEvents: "all", onClick: _this.props.href ? _this._redirectToUrl.bind(_this, _this.props.href) : point.onClick },
25859
25900
  react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { key: index, x: startingPoint[index] + '%', y: 0, width: value + '%', height: barHeight, fill: color })));
25860
25901
  });
25861
25902
  // add benchmark legends
@@ -26822,6 +26863,19 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
26822
26863
  _this._yMax = Math.max(domainValue[domainValue.length - 1], _this.props.yMaxValue || 0);
26823
26864
  }
26824
26865
  };
26866
+ _this._getAriaLabel = function (point) {
26867
+ var _a, _b, _c;
26868
+ var xValue = point.xAxisCalloutData || point.x;
26869
+ var legend = point.legend;
26870
+ var yValue = point.yAxisCalloutData || point.y;
26871
+ var lineLegend = _this.props.lineLegendText || 'Line';
26872
+ var lineYValue = ((_a = point.lineData) === null || _a === void 0 ? void 0 : _a.yAxisCalloutData) || ((_b = point.lineData) === null || _b === void 0 ? void 0 : _b.y);
26873
+ return (((_c = point.callOutAccessibilityData) === null || _c === void 0 ? void 0 : _c.ariaLabel) ||
26874
+ xValue + ". " +
26875
+ (legend ? legend + ", " : '') +
26876
+ (yValue + ".") +
26877
+ (typeof lineYValue !== 'undefined' ? " " + lineLegend + ", " + lineYValue + "." : ''));
26878
+ };
26825
26879
  _this.state = {
26826
26880
  color: '',
26827
26881
  dataForHoverCard: 0,
@@ -26941,7 +26995,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
26941
26995
  }
26942
26996
  return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { key: point.x, x: xBarScale(point.x), className: _this._classNames.opacityChangeOnHover, y: containerHeight - _this.margins.bottom - yBarScale(point.y), width: _this._barWidth, "data-is-focusable": !_this.props.hideTooltip, height: barHeight, ref: function (e) {
26943
26997
  _this._refCallback(e, point.legend);
26944
- }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, colorScale(point.y)), "aria-labelledby": "toolTip" + _this._calloutId, "aria-label": "Vertical bar chart", role: "text", onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, colorScale(point.y)), onBlur: _this._onBarLeave, fill: point.color && !useSingleColor ? point.color : colorScale(point.y) }));
26998
+ }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, colorScale(point.y)), "aria-label": _this._getAriaLabel(point), role: "img", onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, colorScale(point.y)), onBlur: _this._onBarLeave, fill: point.color && !useSingleColor ? point.color : colorScale(point.y) }));
26945
26999
  });
26946
27000
  // Removing un wanted tooltip div from DOM, when prop not provided.
26947
27001
  if (!this.props.showXAxisLablesTooltip) {
@@ -26977,7 +27031,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
26977
27031
  if (barHeight < 1) {
26978
27032
  return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], { key: point.x }, " ");
26979
27033
  }
26980
- return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { key: point.x, x: xBarScale(point.x), y: containerHeight - _this.margins.bottom - yBarScale(point.y), width: _this._barWidth, height: barHeight, "aria-labelledby": "toolTip" + _this._calloutId, "aria-label": "Vertical bar chart", role: "text", ref: function (e) {
27034
+ return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", { key: point.x, x: xBarScale(point.x), y: containerHeight - _this.margins.bottom - yBarScale(point.y), width: _this._barWidth, height: barHeight, "aria-label": _this._getAriaLabel(point), role: "img", ref: function (e) {
26981
27035
  _this._refCallback(e, point.legend);
26982
27036
  }, onMouseOver: _this._onBarHover.bind(_this, point, colorScale(point.y)), onMouseLeave: _this._onBarLeave, onBlur: _this._onBarLeave, onClick: point.onClick, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, point, index, colorScale(point.y)), fill: point.color ? point.color : colorScale(point.y), transform: "translate(" + 0.5 * (xBarScale.bandwidth() - _this._barWidth) + ", 0)" }));
26983
27037
  });
@@ -27364,7 +27418,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
27364
27418
  });
27365
27419
  var rectFocusProps = !shouldFocusWholeStack && {
27366
27420
  'data-is-focusable': !_this.props.hideTooltip,
27367
- 'aria-labelledby': "toolTip" + _this._calloutId,
27421
+ 'aria-label': _this._getAriaLabel(singleChartData, point),
27368
27422
  onMouseOver: _this._onRectHover.bind(_this, singleChartData.xAxisPoint, point, color),
27369
27423
  onMouseMove: _this._onRectHover.bind(_this, singleChartData.xAxisPoint, point, color),
27370
27424
  onMouseLeave: _this._handleMouseOut,
@@ -27385,19 +27439,19 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
27385
27439
  if (barHeight < 1) {
27386
27440
  return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], { key: index + indexNumber }, " ");
27387
27441
  }
27388
- return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ key: index + indexNumber + ("" + shouldFocusWholeStack), className: classNames.opacityChangeOnHover, x: xPoint, y: yPoint, width: _this._barWidth, height: barHeight, fill: color, ref: function (e) { return (ref.refElement = e); } }, rectFocusProps, { role: "text", transform: "translate(" + xScaleBandwidthTranslate + ", 0)" })));
27442
+ return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("rect", Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ key: index + indexNumber + ("" + shouldFocusWholeStack), className: classNames.opacityChangeOnHover, x: xPoint, y: yPoint, width: _this._barWidth, height: barHeight, fill: color, ref: function (e) { return (ref.refElement = e); } }, rectFocusProps, { role: "img", transform: "translate(" + xScaleBandwidthTranslate + ", 0)" })));
27389
27443
  });
27390
27444
  var groupRef = {};
27391
27445
  var stackFocusProps = shouldFocusWholeStack && {
27392
27446
  'data-is-focusable': !_this.props.hideTooltip,
27393
- 'aria-labelledby': "toolTip" + _this._calloutId,
27447
+ 'aria-label': _this._getAriaLabel(singleChartData),
27394
27448
  onMouseOver: _this._onStackHover.bind(_this, singleChartData),
27395
27449
  onMouseMove: _this._onStackHover.bind(_this, singleChartData),
27396
27450
  onMouseLeave: _this._handleMouseOut,
27397
27451
  onFocus: _this._onStackFocus.bind(_this, singleChartData, groupRef),
27398
27452
  onBlur: _this._handleMouseOut,
27399
27453
  onClick: _this._onClick.bind(_this, singleChartData),
27400
- role: 'text',
27454
+ role: 'img',
27401
27455
  };
27402
27456
  return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("g", Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ key: indexNumber + ("" + shouldFocusWholeStack), id: indexNumber + "-singleBar", ref: function (e) { return (groupRef.refElement = e); } }, stackFocusProps), singleBar));
27403
27457
  });
@@ -27480,6 +27534,32 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
27480
27534
  _this._yMax = Math.max(domainValue[domainValue.length - 1], _this.props.yMaxValue || 0);
27481
27535
  }
27482
27536
  };
27537
+ _this._getAriaLabel = function (singleChartData, point) {
27538
+ var _a, _b, _c;
27539
+ if (!point) {
27540
+ /** if shouldFocusWholeStack is true */
27541
+ var xVal = singleChartData.xAxisCalloutData || singleChartData.xAxisPoint;
27542
+ var pointValues = singleChartData.chartData
27543
+ .map(function (pt) {
27544
+ var leg = pt.legend;
27545
+ var yVal = pt.yAxisCalloutData || pt.data;
27546
+ return leg + ", " + yVal + ".";
27547
+ })
27548
+ .join(' ');
27549
+ var lineValues = (_a = singleChartData.lineData) === null || _a === void 0 ? void 0 : _a.map(function (ln) {
27550
+ var leg = ln.legend;
27551
+ var yVal = ln.yAxisCalloutData || ln.data || ln.y;
27552
+ return leg + ", " + yVal + ".";
27553
+ }).join(' ');
27554
+ return (((_b = singleChartData.stackCallOutAccessibilityData) === null || _b === void 0 ? void 0 : _b.ariaLabel) ||
27555
+ xVal + ". " + pointValues + (lineValues ? " " + lineValues : ''));
27556
+ }
27557
+ /** if shouldFocusWholeStack is false */
27558
+ var xValue = singleChartData.xAxisCalloutData || point.xAxisCalloutData || singleChartData.xAxisPoint;
27559
+ var legend = point.legend;
27560
+ var yValue = point.yAxisCalloutData || point.data;
27561
+ return ((_c = point.callOutAccessibilityData) === null || _c === void 0 ? void 0 : _c.ariaLabel) || xValue + ". " + legend + ", " + yValue + ".";
27562
+ };
27483
27563
  _this.state = {
27484
27564
  isCalloutVisible: false,
27485
27565
  isLegendSelected: false,
@@ -28953,7 +29033,7 @@ __webpack_require__.r(__webpack_exports__);
28953
29033
  // Do not modify this file; it is generated as part of publish.
28954
29034
  // The checked in version is a placeholder only and will not be updated.
28955
29035
 
28956
- Object(_uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('@uifabric/charting', '4.23.16');
29036
+ Object(_uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('@uifabric/charting', '4.23.18');
28957
29037
 
28958
29038
 
28959
29039
  /***/ }),
@@ -42073,7 +42153,7 @@ var CalloutContentBase = /** @class */ (function (_super) {
42073
42153
  // eslint-disable-next-line deprecation/deprecation
42074
42154
  _c = _a.shouldRestoreFocus,
42075
42155
  // eslint-disable-next-line deprecation/deprecation
42076
- shouldRestoreFocus = _c === void 0 ? true : _c;
42156
+ shouldRestoreFocus = _c === void 0 ? true : _c, popupProps = _a.popupProps;
42077
42157
  target = this._getTarget();
42078
42158
  var positions = this.state.positions;
42079
42159
  var getContentMaxHeight = this._getMaxHeight()
@@ -42105,7 +42185,7 @@ var CalloutContentBase = /** @class */ (function (_super) {
42105
42185
  tabIndex: -1, ref: this._calloutElement }),
42106
42186
  beakVisible && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: this._classNames.beak, style: this._getBeakPosition() }),
42107
42187
  beakVisible && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: this._classNames.beakCurtain }),
42108
- react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Popup__WEBPACK_IMPORTED_MODULE_5__["Popup"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, Object(_Utilities__WEBPACK_IMPORTED_MODULE_3__["getNativeProps"])(this.props, ARIA_ROLE_ATTRIBUTES), { ariaLabel: ariaLabel, onRestoreFocus: this.props.onRestoreFocus, ariaDescribedBy: ariaDescribedBy, ariaLabelledBy: ariaLabelledBy, className: this._classNames.calloutMain, onDismiss: this.dismiss, onScroll: onScroll, shouldRestoreFocus: shouldRestoreFocus, style: overflowStyle, onMouseDown: this._mouseDownOnPopup, onMouseUp: this._mouseUpOnPopup }), children))));
42188
+ react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Popup__WEBPACK_IMPORTED_MODULE_5__["Popup"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, Object(_Utilities__WEBPACK_IMPORTED_MODULE_3__["getNativeProps"])(this.props, ARIA_ROLE_ATTRIBUTES), { ariaLabel: ariaLabel, onRestoreFocus: this.props.onRestoreFocus, ariaDescribedBy: ariaDescribedBy, ariaLabelledBy: ariaLabelledBy, className: this._classNames.calloutMain, onDismiss: this.dismiss, onScroll: onScroll, shouldRestoreFocus: shouldRestoreFocus, style: overflowStyle, onMouseDown: this._mouseDownOnPopup, onMouseUp: this._mouseUpOnPopup }, popupProps), children))));
42109
42189
  return content;
42110
42190
  };
42111
42191
  CalloutContentBase.prototype._dismissOnClickOrScroll = function (ev) {
@@ -92354,7 +92434,7 @@ __webpack_require__.r(__webpack_exports__);
92354
92434
  // Do not modify this file; it is generated as part of publish.
92355
92435
  // The checked in version is a placeholder only and will not be updated.
92356
92436
 
92357
- Object(_uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('office-ui-fabric-react', '7.199.6');
92437
+ Object(_uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('office-ui-fabric-react', '7.201.0');
92358
92438
 
92359
92439
 
92360
92440
  /***/ }),