microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.34k stars 2.72k forks source link

[Bug]: Upgrading to Tabster v4 makes v8 Dialog trap focus break when mixed with v9 Dialogs #28982

Open micahgodbolt opened 1 year ago

micahgodbolt commented 1 year ago

Library

React Components / v9 (@fluentui/react-components)

System Info

n/a

Are you reporting Accessibility issue?

None

Reproduction

Open sandbox Note that input/button focus zone works as expected, and that v9 works as expected. Open v8 and note that focus does not stay inside the dialog when tabbing forward (it does going backwards).

Remove the v9 control from the page, and the v8 dialog works again.

https://codesandbox.io/s/v8-modals-rendered-with-v9-tabster-4-based-controls-ly6sj9

Bug Description

Before upgrading to Tabster 4, focus would stay trapped in v8 Dialogs

After upgrading to Tabster 4, focus escapes v8 Dialogs and moves to browser chrome, even though v8 dialogs don't use Tabster. This does not appear to affect regular FocusTrapZones (as demo'ed in sandbox)

Logs

No response

Requested priority

Blocking

Products/sites affected

loop

Are you willing to submit a PR to fix?

no

Validations

spmonahan commented 1 year ago

The partner that reported this issue is unblocked so I've put this as "medium" priority. Other partners have faced similar issues when migrating to v9 as they will have controls like Panel that use FocusTrapZone and v9 controls like Dialog that use Tabster and the interactions between the two can sometimes lead to "fights" over focus control. Since incremental adoption is a recommended approach to moving from v8 to v9 we should make an effort to ensure the two remain compatible.

SavannahBourgeois commented 10 months ago

We are seeing something similar in Office. Is there an update on this issue?

niandnad commented 8 months ago

We're observing similar issues in Viva, affecting Modal and Dropdown menus. This is affecting the accessibility of our app and we would really appreciate it if this can be addressed sooner.

Below's some relevant information for the context.

Please note that these issues are reproduced in Teams Personal App. The same code also serves our site directly accessed via a URL and it doesn't seem to be impacted.

spmonahan commented 8 months ago

@mshoho , any thoughts on what might be causing this issue?

mshoho commented 6 months ago

I believe this should be fixed with https://github.com/microsoft/fluentui/pull/30369

bsunderhus commented 6 months ago

Can you confirm this @micahgodbolt?!

NotWoods commented 6 months ago

I tested in Microsoft Loop and confirmed that Fluent V8 dialogs work properly now.

microsoft-github-policy-service[bot] commented 1 day ago

This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".