This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28143 - An option's visibility can be different from the enclosing select visibility
Summary: An option's visibility can be different from the enclosing select visibility
Status: RESOLVED INVALID
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2015-03-05 06:45 UTC by Alexei Barantsev
Modified: 2016-09-19 16:29 UTC (History)
3 users (show)

See Also:


Attachments

Description Alexei Barantsev 2015-03-05 06:45:24 UTC
"OPTIONs and OPTGROUP elements must be displayed if and only if the enclosing select element is displayed."

An option's visibility can be different from the enclosing select visibility.

1. http://jsfiddle.net/d26xvdpt/ -- an invisible select that contains visible options.

2. http://jsfiddle.net/atpqa5fw/ -- a visible select with invisible options.

a) <option value="hidden" style="visibility:hidden">Hidden option</option>
Such an option has no visible text but it is present in the dropdown.
It can be selected in Chrome and IE but it cannot be selected in Firefox.

b) <option value="invisible" style="display:none">Invisible option</option>
Such an option is not present in the dropdown in Chrome and Firefox, but it is present and visible (and selectable) in IE.
Comment 1 Luke Inman-Semerau 2015-03-05 16:48:30 UTC
the second example, in chrome at least, doesn't affect the visibility of the element. I only saw Firefox respect the display:none. So is that a HTML spec bug?

Opacity set to 0 is a dirty trick that we don't allow with other elements either. Yes the user can interact with it, but no, it's not displayed. The options (after selecting) are still not displayed.