Skip to content

Rename selectedcontent "disabled" to "in valid tree position", inverting the value#12369

Open
keithamus wants to merge 4 commits intowhatwg:mainfrom
keithamus:rename-selectedcontent-disabled-to-in-valid-tree-position-inverting-the-value
Open

Rename selectedcontent "disabled" to "in valid tree position", inverting the value#12369
keithamus wants to merge 4 commits intowhatwg:mainfrom
keithamus:rename-selectedcontent-disabled-to-in-valid-tree-position-inverting-the-value

Conversation

@keithamus
Copy link
Copy Markdown
Member

@keithamus keithamus commented Apr 14, 2026

This fixes #12367 by renaming selectedcontent's disabled boolean to is in valid tree position. The value now becomes true when selectedcontent is in a valid tree position, otherwise false. This is flipped from the disabled boolean earlier, so all callsites have been flipped.

This also renames the select's enabled selectedcontent to select's selectedcontent in valid tree position, to better align that naming also.


/form-elements.html ( diff )

@keithamus keithamus requested a review from annevk April 14, 2026 12:15
@keithamus keithamus added editorial Changes that do not affect how the standard is understood topic: select The <select> element labels Apr 14, 2026
Copy link
Copy Markdown

@jnjaeschke jnjaeschke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

But also, it's maybe better if @josepharhar makes this change as part of his PR so he doesn't have to deal with a conflict?

Comment thread source Outdated
@josepharhar
Copy link
Copy Markdown
Contributor

But also, it's maybe better if @josepharhar makes this change as part of his PR so he doesn't have to deal with a conflict?

I'm happy to deal with the merge conflict, I'd like to get this done now so it doesn't look like we have as many open select issues. I don't know when that PR will actually get merged.

Comment thread source Outdated

<p>Every <code>selectedcontent</code> element has a boolean <dfn
data-x="selectedcontent-disabled">disabled</dfn>, which is initially false.</p>
data-x="selectedcontent-in-valid-tree-position">in valid tree position</dfn>, which is initially
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is still changing an ID. I'm also not entirely sure about defaulting to true. I guess it's only an anti-pattern for arguments, but it feels kinda wrong here too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've added a <span id=selectedcontent-disabled></span> here, which should work as an effective alias and no longer break links. Looks like this has been done in other places e.g. <h5 id="rel-alternate"><span id="link-type-alternate"></span> or <p id="structuredclone"><span id="structured-clone"></span>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer not adding more markup.

I guess having read this diff a few times now I'm also kinda neutral on this change, towards the negative side. I find it more verbose and less clear.

@keithamus keithamus force-pushed the rename-selectedcontent-disabled-to-in-valid-tree-position-inverting-the-value branch from 69df3fc to d0ad514 Compare April 16, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial Changes that do not affect how the standard is understood topic: select The <select> element

Development

Successfully merging this pull request may close these issues.

Should <selectedcontent> match :disabled?

4 participants