firebase / firebase-tools-ui

A local-first UI for Firebase Emulator Suite.
https://firebase.googleblog.com/2020/05/local-firebase-emulator-ui.html
Apache License 2.0
262 stars 60 forks source link

fix(a11y) Recapture focus after closing ImportJson dialog #885

Closed TheIronDev closed 1 year ago

TheIronDev commented 1 year ago

This commit fixes an issue where the focus is suddenly lost when the user closes the "Import JSON" on the RTDB page.

Previously, when the dialog closes the focus goes to the bottom of the page (or resets to the head.)

With this commit, we recapture the focus and focus on the "More options" menu. It would have been better to put the focus back on the "Import JSON" button... but the problem is the "Import JSON" button is a child of menu that disappears and becomes un-focusable once selected.

FIXED=259453177, b/259453177

b/259453177