Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Disable focus on non-interactive elements",
"packageName": "@uifabric/charting",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class HorizontalBarChartBase extends React.Component<IHorizontalBarChartP
{points!.chartTitle && (
<div
className={this._classNames.chartDataText}
{...getAccessibleDataObject(points!.chartTitleAccessibilityData)}
{...getAccessibleDataObject(points!.chartTitleAccessibilityData, 'text', false)}
>
{points!.chartTitle}
</div>
Expand Down Expand Up @@ -220,9 +220,7 @@ export class HorizontalBarChartBase extends React.Component<IHorizontalBarChartP

private _getChartDataText = (data: IChartProps) => {
return this.props.barChartCustomData ? (
<div data-is-focusable={true} role="text">
{this.props.barChartCustomData(data)}
</div>
<div role="text">{this.props.barChartCustomData(data)}</div>
) : (
this._getDefaultTextData(data)
);
Expand All @@ -235,7 +233,7 @@ export class HorizontalBarChartBase extends React.Component<IHorizontalBarChartP
const x = chartData.horizontalBarChartdata!.x;
const y = chartData.horizontalBarChartdata!.y;

const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData);
const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);
switch (chartDataMode) {
case 'default':
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,18 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
<FocusZone direction={FocusZoneDirection.horizontal}>
<div className={this._classNames.chartTitle}>
{data!.chartTitle && (
<div {...getAccessibleDataObject(data!.chartTitleAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartTitleAccessibilityData, 'text', false)}>
<strong>{data!.chartTitle}</strong>
</div>
)}
{showRatio && (
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>
<strong>{getChartData()}</strong>
{!hideDenominator && <span>/{convertToLocaleString(total, culture)}</span>}
</div>
)}
{showNumber && (
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>
<strong>{getChartData()}</strong>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ export class StackedBarChartBase extends React.Component<IStackedBarChartProps,
<FocusZone direction={FocusZoneDirection.horizontal}>
<div className={this._classNames.chartTitle}>
{data!.chartTitle && (
<div {...getAccessibleDataObject(data!.chartTitleAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartTitleAccessibilityData, 'text', false)}>
<strong>{data!.chartTitle}</strong>
</div>
)}
{showRatio && (
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>
<span className={this._classNames.ratioNumerator}>{getChartData()}</span>
{!this.props.hideDenominator && (
<span>
Expand All @@ -122,7 +122,7 @@ export class StackedBarChartBase extends React.Component<IStackedBarChartProps,
</div>
)}
{showNumber && (
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData)}>
<div {...getAccessibleDataObject(data!.chartDataAccessibilityData, 'text', false)}>
<strong>{getChartData()}</strong>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Monitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -197,15 +197,15 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Unmonitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -441,15 +441,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Monitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -581,15 +581,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Unmonitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -821,15 +821,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Monitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -965,15 +965,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Unmonitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -1131,7 +1131,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] =
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -1263,15 +1263,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] =
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Unmonitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -1686,15 +1686,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Monitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -1830,15 +1830,15 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Unmonitored
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ exports[`StackedBarChart snapShot testing renders StackedBarChart correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Stacked bar chart 2nd example
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<span
Expand Down Expand Up @@ -218,15 +218,15 @@ exports[`StackedBarChart snapShot testing renders enabledLegendsWrapLines correc
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Stacked bar chart 2nd example
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<span
Expand Down Expand Up @@ -394,15 +394,15 @@ exports[`StackedBarChart snapShot testing renders hideDenominator correctly 1`]
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Stacked bar chart 2nd example
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<span
Expand Down Expand Up @@ -556,15 +556,15 @@ exports[`StackedBarChart snapShot testing renders hideLegend correctly 1`] = `
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Stacked bar chart 2nd example
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<span
Expand Down Expand Up @@ -732,7 +732,7 @@ exports[`StackedBarChart snapShot testing renders hideNumberDisplay correctly 1`
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down Expand Up @@ -878,15 +878,15 @@ exports[`StackedBarChart snapShot testing renders hideTooltip correctly 1`] = `
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Stacked bar chart 2nd example
</strong>
</div>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<span
Expand Down Expand Up @@ -1054,7 +1054,7 @@ exports[`StackedBarChart snapShot testing renders ignoreFixStyle correctly 1`] =
}
>
<div
data-is-focusable={true}
data-is-focusable={false}
role="text"
>
<strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ class StandardTree {
height={rectangleHeight}
x={xCoordinate}
y={yCoordinate}
tabIndex={0}
role={'text'}
data-is-focusable={true}
aria-label={ariaLabel}
className={this.styleClassNames.rectNode}
stroke={fillColor}
Expand Down
Loading