Post

So if you set the label attribute on optgroup and give it the legend, then in older browsers it will fallback more gracefully (using the label attribute). Because optgroup would be preserved, fieldset wouldn't be. optgroup is also semantically more correct.

Yeah so legend is allowed inside optgroup (as well as fieldset) now, it's part of the new content model for select. In older browsers the parser will strip it so it's fine there too.