<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>255335</bug_id>
          
          <creation_ts>2023-04-12 06:54:42 -0700</creation_ts>
          <short_desc>hidden attribute doesn&apos;t work on select&apos;s option and optgroup</short_desc>
          <delta_ts>2023-05-15 01:01:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>Safari 16</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=169039</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=8351</see_also>
          <bug_file_loc>https://jsfiddle.net/73y0fmek/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mattia Astorino">astorino.design</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1948212</commentid>
    <comment_count>0</comment_count>
    <who name="Mattia Astorino">astorino.design</who>
    <bug_when>2023-04-12 06:54:42 -0700</bug_when>
    <thetext>Hello, just reporting that option elements with the hidden attribute are broken and they&apos;re still visible and can be selected.

DEMO:
https://jsfiddle.net/73y0fmek/

The option &quot;1&quot; and the option group should not be visible like the spec say. Works with firefox and Chrome/Edge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948231</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-12 07:57:30 -0700</bug_when>
    <thetext>&lt;rdar://problem/107939825&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948388</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-04-12 17:28:16 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948413</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-04-12 19:40:01 -0700</bug_when>
    <thetext>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&amp;) 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948416</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-04-12 19:49:29 -0700</bug_when>
    <thetext>I&apos;m trying to remove them in a local branch to see what it does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948487</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-04-13 07:27:51 -0700</bug_when>
    <thetext>So removing the RendererIsNeeded doesn&apos;t change anything to the behavior. It doesn&apos;t break things, but it doesn&apos;t improve things.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>