Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.w3.org/TR/html401/interact/forms.html#edef-OPTION" rel="nofollow noreferrer">The HTML specs</a> state that both selected &amp; disabled are available options for the <code>&lt;option&gt;</code> element, but doesn't specify what should happen in case of a conflict. In the <a href="http://www.w3.org/TR/html401/interact/forms.html#disabled" rel="nofollow noreferrer">section on disabled controls</a> it says</p> <blockquote> <p>When set, the disabled attribute has the following effects on an element:</p> <ul> <li>Disabled controls do not receive focus. </li> <li>Disabled controls are skipped in tabbing navigation. </li> <li>Disabled controls cannot be successful.</li> </ul> </blockquote> <p>it also says</p> <blockquote> <p>How disabled elements are rendered depends on the user agent. For example, some user agents "gray out" disabled menu items, button labels, etc. In this example, the INPUT element is disabled. Therefore, it cannot receive user input nor will its value be submitted with the form.</p> </blockquote> <p>While this specific case isn't specified, my reading of this says that the actual rendering of a 'selected' 'disabled' element is left up to the browser. As long as the user cannot select it then it's working as standard. It does say that a script can act upon the element, so it is possible for Javascript to set a disabled option as selected (or disable a selected option). This isn't contrary to the standards, but on form submission, that option's value couldn't be the selected value. The select list would (I assume) have to have an empty value in this case.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload