Originally, it was div[role=group] with no legend.
Then in #2783 we changed it to use fieldset/legend with some aria-hidden and ScreenReaderOnly gymnastics to solve all the a11y and design issues.
Then in #2888 we discovered we might have made the a11y worse so we largely reverted the change in #2989.
We still want to introduce fieldset and legend into our form layouts but we gotta be careful about how...
Maybe we need to first come up with a plan for #2493 before tackling this? That would, potentially, give us a more prescriptive usage pattern for developers to use which might loosen up the abstract nature of the a11y and design issues...
Originally, it was
div[role=group]with nolegend.Then in #2783 we changed it to use
fieldset/legendwith somearia-hiddenandScreenReaderOnlygymnastics to solve all the a11y and design issues.Then in #2888 we discovered we might have made the a11y worse so we largely reverted the change in #2989.
We still want to introduce
fieldsetandlegendinto our form layouts but we gotta be careful about how...Maybe we need to first come up with a plan for #2493 before tackling this? That would, potentially, give us a more prescriptive usage pattern for developers to use which might loosen up the abstract nature of the a11y and design issues...