Make <option> and <optgroup> share a text content algorithm#12232
Open
Make <option> and <optgroup> share a text content algorithm#12232
Conversation
This also fixes several other issues: 1. Since the current text cares about all legend element children, we want the first legend element child. Not the first child if it is a legend element. 2. <img alt> offers replacement text and as such adding spaces on both sides is wrong. 3. When includeAltText is false we still want to skip the descendants of img elements. This does not fix an existing issue which is that user agents should be allowed to render the img elements as well if they want to.
Contributor
The content model of the optgroup element only allows a legend if it is the first child though, right? Otherwise this change looks ok to me |
Member
Author
|
The content model has no bearing on browsers. However, it seems that in #12199 we are thinking of changing the standard to require that only the first element child is checked for being a So I guess I'll wait with this to see how your experiment pans out and if it pans out favorably I will update the text. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This also fixes several other issues:
This does not fix an existing issue which is that user agents should be allowed to render the img elements as well if they want to.
(See WHATWG Working Mode: Changes for more details.)
/form-elements.html ( diff )
/rendering.html ( diff )