You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
within a select element, if an option has a label attribute and child content, the label attribute value renders and the child content does not. the value attribute, which is not rendered for select elements, can also be rendered for datalist options, which then also needs to be considered for what the visible name for these options would be.
but within a datalist, if an option has both a label attribute and child content, both will render - and again, if a value attribute is in the mix, then that will often take precedent over one of the other labeling mechanisms.
browsers expose this differently - where chromium exposes both pieces of information, safari renders both but only exposes one, and firefox only renders and exposes one of the two.
this needs cleanup
The text was updated successfully, but these errors were encountered:
scottaohara
changed the title
specify unique behavior for label attribute on option in datalist
specify unique behavior for label and value attributes on option in datalist
Mar 12, 2025
just noting per the lengthy comment I just made in the HTML issue about datalist options, that as part of this PR it needs to be explicitly called out in the option accName steps that value contributes to the name / visible label of an optiononly in if the option is a child of a datalist
within a select element, if an option has a label attribute and child content, the label attribute value renders and the child content does not. the value attribute, which is not rendered for select elements, can also be rendered for datalist options, which then also needs to be considered for what the visible name for these options would be.
but within a datalist, if an option has both a label attribute and child content, both will render - and again, if a value attribute is in the mix, then that will often take precedent over one of the other labeling mechanisms.
browsers expose this differently - where chromium exposes both pieces of information, safari renders both but only exposes one, and firefox only renders and exposes one of the two.
this needs cleanup
The text was updated successfully, but these errors were encountered: