Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -56989,9 +56989,9 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p>The <dfn element-attr for="option"><code data-x="attr-option-disabled">disabled</code></dfn>
attribute is a <span>boolean attribute</span>. An <code>option</code> element is <dfn
data-x="concept-option-disabled">disabled</dfn> if its <code
data-x="attr-option-disabled">disabled</code> attribute is present or if it is a child of an
<code>optgroup</code> element whose <code data-x="attr-optgroup-disabled">disabled</code>
attribute is present.</p>
data-x="attr-option-disabled">disabled</code> attribute is present or if it is a
<span>descendant</span> of an <code>optgroup</code> element whose <code
data-x="attr-optgroup-disabled">disabled</code> attribute is present.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it also be disabled when we have <optgroup disabled><optgroup><option>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nested optgroups are something that we decided not to support, so in this case I don't think it should be disabled. I changed the text to look for the nearest ancestor optgroup instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a test for this case.

Copy link
Member

@annevk annevk Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I also have some other reservations. Is <select disabled><option> not disabled? What about <optgroup disabled><select><option>? (Not sure what the right answers are here, but it should be clear and we need test coverage, even if they are edge cases.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<select disabled><option> is not disabled, and <optgroup disabled><select><option> is also not disabled with the latest commit which aborts if it finds a select element before an optgroup. I will add tests.

</div>

<div w-nodev>
Expand Down