Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
374a473
Updated bar role from image to button based on the props to fix voice…
v-baambati May 5, 2026
e9e7c8f
Added change file
v-baambati May 5, 2026
b94c045
Updated bar role from image to button based on the props to fix voice…
v-baambati May 6, 2026
9639b2e
Updated bar role from image to button based on the props to fix voice…
v-baambati May 6, 2026
64d2e56
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 6, 2026
453a8c2
Updated snashots
v-baambati May 6, 2026
d757798
Updated snashots
v-baambati May 6, 2026
3d21570
Updated failed test cases
v-baambati May 6, 2026
f44e621
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 7, 2026
dc2891b
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 18, 2026
2ddac2c
updated role type
v-baambati May 18, 2026
1f54ba9
updated role type
v-baambati May 18, 2026
09411a4
updated snapshots
v-baambati May 18, 2026
57e6067
updated test cases to fix build issue
v-baambati May 18, 2026
2e79b5b
updated snapshots
v-baambati May 18, 2026
2704593
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 19, 2026
49d3abb
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 25, 2026
149bf2b
git commit -m "resolved PR comments"
v-baambati May 27, 2026
830ac31
updated tests
v-baambati May 27, 2026
89465a6
Merge branch 'master' of https://github.com/microsoft/fluentui into M…
v-baambati May 27, 2026
bff02fa
Updated role value to horizontalbarchart
v-baambati Jun 4, 2026
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": "Accessibility bug fix",
"packageName": "@fluentui/react-charts",
"email": "132879294+v-baambati@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
calcBandwidth,
calcTotalBandUnits,
sortAxisCategories,
getAriaRole,
} from '../../utilities/index';

import type {
Expand Down Expand Up @@ -594,7 +595,7 @@ export const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = R
onClick={pointData.onClick}
aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}
tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}
role="img"
role={getAriaRole(pointData.onClick)}
/>,
);

Expand Down Expand Up @@ -871,7 +872,7 @@ export const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = R
tabIndex={shouldHighlight ? 0 : undefined}
onFocus={e => _onLineFocus(e, series, seriesIdx, pointIdx)}
onBlur={_onBarLeave}
role="img"
role={getAriaRole(point.onClick)}
aria-label={getAriaLabel(
{
xAxisCalloutData: point.xAxisCalloutData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ export const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps
const xValue = point.horizontalBarChartdata!.x;
const placeholderIndex = 1;
const isLegendSelected: boolean = _legendHighlighted(point.legend) || _noLegendHighlighted();
const chartBarAriaLabel = _getAriaLabel(point).trim();
const barAriaLabel = chartBarAriaLabel.length > 0 ? chartBarAriaLabel : 'Bar segment';

// Render bar label instead of placeholder bar for absolute-scale variant
if (index === placeholderIndex && props.variant === HorizontalBarChartVariant.AbsoluteScale) {
Expand Down Expand Up @@ -320,8 +322,9 @@ export const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps
_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined
Comment thread
v-baambati marked this conversation as resolved.
}
onFocus={_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined}
role="img"
aria-label={_getAriaLabel(point)}
role="option"
aria-selected={isLegendSelected}
aria-label={barAriaLabel}
onBlur={_hoverOff}
onMouseLeave={_hoverOff}
className={classes.barWrapper}
Expand Down Expand Up @@ -417,6 +420,7 @@ export const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps
props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : _getChartDataText(points!);
const bars = _createBars(points!);
const keyVal = _uniqLineText + '_' + index;
const chartGroupAriaLabel = points!.chartTitle?.trim() ? points!.chartTitle : 'Horizontal bar chart data';
// ToDo - Showtriangle property is per data series. How to account for it in the new stylesheet
/* const classes = useHorizontalBarChartStyles(props.styles!, {
width: props.width,
Expand All @@ -440,7 +444,9 @@ export const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps
{points!.chartData![0].data && _createBenchmark(points!)}
<svg ref={barChartSvgRef} className={classes.chart} aria-label={points!.chartTitle}>
<g
role="listbox"
id={keyVal}
aria-label={chartGroupAriaLabel}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The outer svg already has aria label. Is aria label necessary here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @AtishayMsft otherwise it is throwing error in fast pass tool. FFB

Fix ONE of the following:
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try setting the title attribute

Copy link
Copy Markdown
Contributor Author

@v-baambati v-baambati Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @AtishayMsft SVG element does not have title prop so it is forcing me to add aria label

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the aria-labelledby attribute of the outer containing svg element

ref={(e: SVGGElement) => {
_refCallback(e, points!.chartData![0].legend);
}}
Expand Down
Loading
Loading