You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dialog: on Android, keyboard focus isn't moved into an open dialog and Tab reaches the screen behind it #5296
On Android with a hardware keyboard, opening a Dialog leaves no view with keyboard focus. Tab then moves through the buttons of the screen behind the scrim before it reaches the dialog's hidden close button and its actions, and Enter on a button behind the dialog presses it (on the example app's Dialog screen it opened a second dialog on top of the first). The screen behind is hidden from TalkBack, so with TalkBack on nothing is spoken while focus is there. On web, focus moves into the dialog and Tab stays inside it. 6.0.0-alpha.3 has the same Tab order.
Expected behaviour
As on web: focus moves into the dialog when it opens, Tab stays inside it, and the screen behind can't be reached or pressed while the dialog is open.
How to reproduce?
On Android with a hardware keyboard, render a screen with a few buttons and a Dialog that one of them opens:
<ButtononPress={()=>setVisible(true)}>Open</Button><ButtononPress={()=>{}}>Behind</Button><Dialogvisible={visible}onDismiss={hide}title="Alert"actions={[<Buttonkey="ok"mode="text"onPress={hide}>
OK
</Button>,]}/>
Open the dialog (tap or Enter), press Tab several times, then press Enter when "Behind" has focus.
Related: #5203 (where TalkBack's focus lands on Android).
Activity