Component: Untriaged → Untriaged
Product: Firefox → Core
I'm afraid <https://html.spec.whatwg.org/multipage/#the-form-element> shows that the HTMLFormElement interface has the OverrideBuiltins extended attribute, which implies this behaviour: <http://heycam.github.io/webidl/#OverrideBuiltins>. INVALID per spec; you could try to get the spec changed, though I doubt you'd succeed.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
The same issue exists even if you change the parent from form element to div element and according to https://html.spec.whatwg.org/multipage/semantics.html#the-div-element div does not have the OverrideBuiltins. But why would the OverrideBuiltins affect id="hidden" context, hidden in this case is only being used as a string context and nothing else.
ignore the previous comment, it does not happen for div, only happens for div if there is a form element embedded under div
form elements have a getter that exposes elements by ID as properties on the element: https://html.spec.whatwg.org/multipage/forms.html#dom-form-nameditem
You need to log in before you can comment on or make changes to this bug.