Skip to content

Commit

Permalink
Allow focus navigation with tab key in donut chart (#25654)
Browse files Browse the repository at this point in the history
* allow focus navigation with tab key in donut chart

* add change file
  • Loading branch information
krkshitij authored Nov 17, 2022
1 parent 0cc13a6 commit 50ee718
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Allow focus navigation with tab key in donut chart",
"packageName": "@fluentui/react-charting",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';
import * as scale from 'd3-scale';
import { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';
import { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';
import { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';
import { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';
import { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';
import { Pie } from './Pie/index';
import { IChartDataPoint, IChartProps, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';
Expand Down Expand Up @@ -104,7 +104,7 @@ export class DonutChartBase extends React.Component<IDonutChartProps, IDonutChar
ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}
onMouseLeave={this._handleChartMouseLeave}
>
<FocusZone direction={FocusZoneDirection.horizontal} isCircularNavigation={true}>
<FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>
<div>
<svg
className={this._classNames.chart}
Expand Down

0 comments on commit 50ee718

Please sign in to comment.