Closed Bug 2086220 Opened 1 month ago Closed 1 month ago

Clear browsing data dialog shows a focus ring on its initial focus when opened with the mouse

Categories

(Toolkit :: Data Sanitization, defect)

defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: jleritte, Assigned: jleritte)

References

Details

Attachments

(1 external file)

The clear browsing data dialog starts with focus on the time range dropdown. That focus always shows a focus ring, even when the dialog was opened with the mouse, so the space below the dropdown looks smaller than in the design.

The ring should only show when the dialog was opened with the keyboard (and, as today, as soon as the user moves focus with the keyboard), which keyboard users need to see where focus went.

Bug 1708261 lets SubDialog tell the dialog whether it was opened with the keyboard, from the event that opened it. The dialog's subDialogSetDefaultFocus handler should follow that (focus({ focusVisible })), and its openers should pass their event: Sanitizer.showUI gets a triggeringEvent option, passed by the Clear recent history command and by the fire button (its "Choose…" link and its direct flow).

This was D335816, first attached to bug 2083944 (the dialog's strings), and moved here since it's a separate change.

Depends on: 2086219

The dialog starts with focus on the time range dropdown, whose focus ring made the space below it look smaller than in the design. Its focus handler now follows SubDialog's focusVisible, so the ring only shows when the dialog was opened with the keyboard (and as soon as the user moves focus with it).

Sanitizer.showUI takes a triggeringEvent option, which it passes on to gDialogBox. The Clear recent history command passes its event. So does the fire button: the command event of its Choose… link, or in the direct flow the event that activated the button, kept from onBeforeCommand since ViewShowing doesn't carry it.

Pushed by jleritte@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b3d339ed6ea4 https://hg.mozilla.org/integration/autoland/rev/b277716fe868 Only show a focus ring on the clear browsing data dialog's initial focus when it was opened with the keyboard. r=manuel,accessibility-platform-reviewers,morgan
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: