Yesterday Google Chrome announced coming support for `<hr>` in `<select> menus. I was curious how its and Apple Safari’s support fared versus Chrome, Safari, and Firefox support for `<optgroup>`.
Splitting within Selects: https://adrianroselli.com/2023/10/splitting-within-selects.html
I dug a bit into spec/support timelines as well.
@aardrian great breakdown! Do you happen to have tested what happens if you put an hr inside an optgroup? Is that even allowed by the spec?
@realms I did not test it. According to the HTML5 spec:
“An optgroup element's end tag can be omitted if the optgroup element is immediately followed by another optgroup element, if it is immediately followed by an hr element, or if there is no more content in the parent element.”
https://html.spec.whatwg.org/multipage/form-elements.html#the-optgroup-element