What's the most appropriate, semantically correct way to label checkbox and radio elements? Obviously, giving each one a unique id
attribute is an option and using that in id a <label for="">
, but this seems like it would break the semantic grouping. Putting unenclosed text next to the input
element just seems...wrong.
Edit: Additionally, how should one denote the label for a group of such elements? (i.e. not the description of each option, but the description of the whole group)