Hello, just reporting that option elements with the hidden attribute are broken and they're still visible and can be selected. DEMO: https://jsfiddle.net/73y0fmek/ The option "1" and the option group should not be visible like the spec say. Works with firefox and Chrome/Edge.
<rdar://problem/107939825>
We had earlier reports of this, but they seem to be duped to different bugs that are all similar yet not obviously the same. This may need some cleanup. Cf. bug 8351, bug 25623, bug 62900, bug 169039, bug 191581
In Bug 191581, Chris has done a bit of analysis about the possible why? I followed the track of https://bugs.webkit.org/show_bug.cgi?id=191581#c2 where he said: ``` Both HTMLOptionElement and HTMLOptGroupElement have the following override: bool rendererIsNeeded(const RenderStyle&) final { return false; } Not sure why they do not need a renderer. ``` If we go down following the history, it has been added at a very early stage. Thu, 6 Jul 2006 05:47:30 +0000 https://searchfox.org/wubkat/diff/1018550ecbdbd0f48c091502b7e2a0f26f8c9481/WebCore/html/HTMLOptGroupElement.h#46 Maybe… the solution is that nobody tried to remove this.
I'm trying to remove them in a local branch to see what it does.
So removing the RendererIsNeeded doesn't change anything to the behavior. It doesn't break things, but it doesn't improve things.