Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,18 @@ export const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps
_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined
Copy link
Copy Markdown

@github-actions github-actions Bot May 5, 2026

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 496 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 1230 Changed
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 1109 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 497 Changed
vr-tests-react-components/Charts-DonutChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 744 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 136 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 33 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 157 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 174 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with square - Dark Mode.default.chromium.png 4 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

}
onFocus={_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined}
role="img"
role={point.onClick || (!props.hideTooltip && point.legend !== '') ? 'button' : 'img'}
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.

Isn't setting the role as button sufficient for interactive elements? Why update tabIndex?

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 @krkshitij these changes are sufficient but there is one more issue even non interactive element is focusable with customer for that we need to have tab index related changes.

aria-label={_getAriaLabel(point)}
onBlur={_hoverOff}
onMouseLeave={_hoverOff}
className={classes.barWrapper}
opacity={isLegendSelected ? 1 : 0.1}
tabIndex={_legendHighlighted(point.legend!) || _noLegendHighlighted() ? 0 : undefined}
tabIndex={
(_legendHighlighted(point.legend!) || _noLegendHighlighted()) &&
(point.onClick || (!props.hideTooltip && point.legend !== ''))
? 0
: undefined
}
/>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,12 @@ export const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> =
onClick={point.onClick}
onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}
aria-label={_getAriaLabel(point)}
role="img"
role={point.onClick || !props.hideTooltip ? 'button' : 'img'}
onMouseLeave={_onBarLeave}
onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}
onBlur={_onBarLeave}
fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}
tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}
tabIndex={(!props.hideTooltip || point.onClick) && shouldHighlight ? 0 : undefined}
opacity={shouldHighlight ? 1 : 0.1}
rx={props.roundCorners ? 3 : 0}
/>
Expand Down Expand Up @@ -732,7 +732,7 @@ export const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> =
width={_barWidth}
height={adjustedBarHeight}
aria-label={_getAriaLabel(point)}
role="img"
role={point.onClick || !props.hideTooltip ? 'button' : 'img'}
ref={(e: SVGRectElement) => {
_refCallback(e, point.legend!);
}}
Expand All @@ -742,7 +742,7 @@ export const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> =
onBlur={_onBarLeave}
onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}
fill={point.color ? point.color : colorScale(point.y)}
tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}
tabIndex={(!props.hideTooltip || point.onClick) && shouldHighlight ? 0 : undefined}
rx={props.roundCorners ? 3 : 0}
opacity={shouldHighlight ? 1 : 0.1}
/>
Expand Down Expand Up @@ -796,12 +796,12 @@ export const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> =
onClick={point.onClick}
onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}
aria-label={_getAriaLabel(point)}
role="img"
role={point.onClick || !props.hideTooltip ? 'button' : 'img'}
onMouseLeave={_onBarLeave}
onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}
onBlur={_onBarLeave}
fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}
tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}
tabIndex={(!props.hideTooltip || point.onClick) && shouldHighlight ? 0 : undefined}
rx={props.roundCorners ? 3 : 0}
opacity={shouldHighlight ? 1 : 0.1}
/>
Expand Down
Loading