Closed Bug 1648733 Opened 4 years ago Closed 6 months ago

missing console warning when an invalid and hidden form control is not focusable

Categories

(Core :: DOM: Forms, defect)

77 Branch
defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox121 --- verified
firefox122 --- verified

People

(Reporter: macorte, Assigned: vhilla)

References

Details

(Keywords: parity-chrome)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

click on a submit button in a form with hidden and invalid input
test form here to reproduce... https://www.codeply.com/p/F2laD7MDjv

Actual results:

in the developer console there are no warnings regarding the impossibility of placing the focus on the control

Expected results:

in the developer console there should be a warning.
ex: An invalid form control with name='inputfilehidden' is not focusable.

ps. I copied the message from other chromium based browsers (ms-edge/google chrome)

Attached image ms-edge.jpg
Attached image firefox77-windows.png

the biggest problem in the lack of warning in the console that in the web development phase the problem is not noticed

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Console
Product: Firefox → DevTools

Yura, is this something that is/should be handled by the Accessibility panel? or should we have an error like in Chromium-based browsers?

Flags: needinfo?(yzenevich)

I'm not sure this is an issue. I would probably categorize it as an author error. I'm curious why there's an expectation of something that has display:hidden to be focusable. In fact the accessibility issue would've been if something was focusable in a hidden subtree (e.g. inaccessible to assistive tech).

Accessibility panel will not catch this on audit because hidden elements will not have an accessible object in the first place.

I guess though, this bug reminds me of a conversation about having, possibly, a filter category for console messages that are related to accessibility. Maybe we should revisit it at some point sooner rather than later?

Flags: needinfo?(yzenevich)

@yura i agree with you, it's not an Accessibility issue, imho this is just a lack of diagnostic messages in the consoles that do not allow the webdeveloper (the main user of the webdev console) to understand what's going on.

in my opinion it's dev tools bug , the effect of making an invisible field mandatory (sure it's a webdeveloper/author fault) is that the form is not submitted at all.

There are no traces in the network console and there are no traces in the javascript console.

in this way the developer/author has no help from webtools to understand what's going on and that's why, in my opinion, a diagnostic message (as other browsers do) would be a clarifier

Let's see if the DOM team can help here

Component: Console → DOM: Forms
Product: DevTools → Core

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #8)

Let's see if the DOM team can help here

i think it's related to firefox built-in form validation of HTML5 form controls, that try (without success) to put focus on the first and only hidden invalid field.

Severity: -- → S3
Assignee: nobody → vhilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9355503 - Attachment description: Bug 1648733 - Report invalid and hidden form controls to console. r=#dom-core → xBug 1648733 - Report invalid and hidden form controls to console. r=#dom-core
Attachment #9355503 - Attachment description: xBug 1648733 - Report invalid and hidden form controls to console. r=#dom-core → Bug 1648733 - Report invalid and hidden form controls to console. r=#dom-core
Pushed by vhilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0b493a86f116
Report invalid and hidden form controls to console. r=dom-core,jjaschke
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
QA Whiteboard: [qa-121b-p2]

Reproducible on a 2023-10-28 Nightly build on Windows 10.
Verified as fixed on Firefox 121.0 and Nightly 122.0a1 on Windows 10, Ubuntu 22, macOS 12.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-121b-p2]
Regressions: 1876792
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: