Component
FluentProvider
Package version
9.70.0
React version
18.3.1
Environment
System:
OS: Windows 11 10.0.26200
Binaries:
Node: 20.20.2
Yarn: 1.22.22
npm: 10.8.2
Browsers:
Edge (Chromium): 153.0.4234.48
npmPackages:
react: 16.14.0
react-dom: 16.14.0
@types/react: 17.0.43
@types/react-dom: 16.9.24
@fluentui/react-components: 9.70.0
@fluentui/react-provider: 9.22.11
@fluentui/react-tabster: 9.26.13
@fluentui/react-link: 9.7.0
@fluentui/react-button: 9.6.12
keyborg: 2.6.0
Current Behavior
A FluentProvider can end up mounted with no focus-visible listener on its subtree at all. Every element inside it then takes real keyboard focus while keyborg is in keyboard-navigation mode, but never receives data-fui-focus-visible hence no focus indicator is ever drawn. It is permanent: no amount of tabbing restores it, and there is no warning.
In short, useFocusVisible binds the focus-visible polyfill once and never re-evaluates.
This occurs, when we are navigating from one service to another on redirect.
Potential cause here packages/react-components/react-tabster/src/hooks/useFocusVisible.ts.
Expected Behavior
Any element holding keyboard focus inside a mounted FluentProvider should receive data-fui-focus-visible and render a focus indicator, for the whole lifetime of that provider.
Reproduction
https://stackblitz.com/edit/qcbyxose-caieu9t2?file=src%2FApp.tsx
Steps to reproduce
- Open the reproduction and click into the preview pane.
- Tab through the "Control" row and the "Affected" row — both show focus rings, and the readout shows
data-fui-focus-visible: YES.
- Click "Remove outer provider".
- Tab through the "Affected" row again.
- The readout confirms focus really moves onto each Link and the Button, but
data-fui-focus-visible is never set and no focus ring is drawn. No further tabbing, clicking, or key press ever restores it.
Are you reporting an Accessibility issue?
yes
Suggested severity
High - No workaround
Products/sites affected
Account.live.com
Are you willing to submit a PR to fix?
no
Validations
Component
FluentProvider
Package version
9.70.0
React version
18.3.1
Environment
Current Behavior
A
FluentProvidercan end up mounted with no focus-visible listener on its subtree at all. Every element inside it then takes real keyboard focus while keyborg is in keyboard-navigation mode, but never receivesdata-fui-focus-visiblehence no focus indicator is ever drawn. It is permanent: no amount of tabbing restores it, and there is no warning.In short, useFocusVisible binds the focus-visible polyfill once and never re-evaluates.
This occurs, when we are navigating from one service to another on redirect.
Potential cause here packages/react-components/react-tabster/src/hooks/useFocusVisible.ts.
Expected Behavior
Any element holding keyboard focus inside a mounted
FluentProvidershould receivedata-fui-focus-visibleand render a focus indicator, for the whole lifetime of that provider.Reproduction
https://stackblitz.com/edit/qcbyxose-caieu9t2?file=src%2FApp.tsx
Steps to reproduce
data-fui-focus-visible: YES.data-fui-focus-visibleis never set and no focus ring is drawn. No further tabbing, clicking, or key press ever restores it.Are you reporting an Accessibility issue?
yes
Suggested severity
High - No workaround
Products/sites affected
Account.live.com
Are you willing to submit a PR to fix?
no
Validations