missing console warning when an invalid and hidden form control is not focusable
Categories
(Core :: DOM: Forms, defect)
Tracking
()
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)
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
Reporter | ||
Comment 3•4 years ago
|
||
the biggest problem in the lack of warning in the console that in the web development phase the problem is not noticed
Comment 4•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 5•4 years ago
|
||
Yura, is this something that is/should be handled by the Accessibility panel? or should we have an error like in Chromium-based browsers?
Comment 6•4 years ago
|
||
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?
Reporter | ||
Comment 7•4 years ago
|
||
@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
Comment 8•4 years ago
|
||
Let's see if the DOM team can help here
Reporter | ||
Comment 9•4 years ago
|
||
(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.
Updated•4 years ago
|
Assignee | ||
Comment 10•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Comment 11•6 months ago
|
||
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
Comment 12•6 months ago
|
||
bugherder |
Updated•5 months ago
|
Comment 13•4 months ago
|
||
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.
Description
•