Closed Bug 1997399 Opened 10 months ago Closed 7 months ago

[dialogs] Keyboard focus moves outside of modal dialogs

Categories

(Firefox :: New Tab Page, defect)

Firefox 146
x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
Accessibility Severity s2
Tracking Status
firefox146 --- affected

People

(Reporter: nstroud, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Screen recording (no audio)

STR:

  1. Open Firefox Nightly

  2. Go to about:newtab

  3. Open any of the following modals: 'New shortcut', 'Edit shortcut', 'Block', or 'Delete from history'
    --New Shortcut: opens from clicking 'Add shortcut' button
    --Edit shortcut: click a shortcut > kebab icon button > Edit
    --Block: click the kebab icon button at the top right of any row that has story cards > Block
    --Delete from history: click the kebab icon button at the top right of a shortcut > Delete from history

  4. With the TAB key, move focus and observe behavior

Actual / Expected:

TAB should move focus to the next focusable element inside the dialog. When focus is on the last focusable element in the dialog, focus moves to the first focusable element in the dialog

See: Modal Dialog Example | WAI

I think a way of solving this issue would be to convert the modals we have on newtab to use the Dialog HTML element: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog It's a newer element that's been made to tackle a lot of the a11y issues hard-coded modals create. It's already being used in several places (i.e. Report content/report ads, and the weather opt-in dialog).

The severity field is not set for this bug.
:thecount, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sdowne)
Depends on: 2000494
Depends on: 2007031

I think this can officially be closed, as we updated our modal components to be the native HTML dialog element!

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED

Re-opening this as one of its blocking tickets has been backed out and I'll need to work on a fix. I'll close it once it's patched up.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Okay, officially closing this now as the backed out ticket has been fixed! Modals are now accessible on newtab :)

Status: REOPENED → RESOLVED
Closed: 8 months ago7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.