Open Bug 1795509 Opened 2 years ago Updated 2 years ago

Element with overflow-x: hidden can be focused by Tab key

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Firefox 105
defect

Tracking

()

People

(Reporter: k3768z52, Unassigned, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Attached file tab-focus-repro.html

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

  1. Open the attached file (tab-focus-repro.html) in Firefox.
  2. Press the Tab key

Actual results:

The text can be focused using the Tab key, which does not make sense. It is neither scrollable nor clickable.

Expected results:

The text should not be focusable by the Tab key.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

This code should be tweaked to handle each direction separately. Should be a trivial-ish bug fix + test.

Mentor: emilio
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: good-first-bug
Severity: -- → S3
Priority: -- → P3

Hello, I'm interested to fix this bug!

I need help how to create the test file. Is there any existing test as an example?

Flags: needinfo?(emilio)

Yes, sure! dom/base/test/test_focus_scrollable_fieldset.html is a somewhat related test you could probably copy as a start.

Instead of focusing <input>s, you could be focusing <p> elements with different overflow values and contents.

Flags: needinfo?(emilio)

you could be focusing <p> elements with different overflow values and contents.

Just to confirm, so I need to create test cases for all possible overflow value (visible, hidden, scroll, auto), also with combination of all direction (x, y, both), is that correct?

Might not be necessary to test visible, nor differentiate between scroll/auto, but you want to test overflow hidden in both and any axis, with and without scroll range on any of the axes.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: