DEV Community

Discussion on: Breaking the law with <fieldset>

Collapse
moopet profile image
Ben Sinclair

As long as the fieldsets make sense and you're not putting "first name" in one and "last name" in another, what's the problem? This is exactly the right element to use!

Collapse
jfbrennan profile image
Jordan Brennan Author

Agreed! But I've always wondered why do Bootstrap et al not use it? They do the div+classes thing. I think it's because convention taught us to only use fieldset for radio and checkbox groups...

Collapse
moopet profile image
Ben Sinclair

I think bootstrap (and similar) are made by people who have already decided to reject semantic HTML. The philosophy is totally different - they assume you will be updating your templates when you make cosmetic changes, and that any machine-readable data will be presented in some other way, like as embedded JSON, and that you will manage accessibility with aria attributes as you go.

I don't agree with that (could you tell?) but it's the way a lot of frameworks are designed. Proponents say it makes things simpler and quicker to put together.

Thread Thread
jfbrennan profile image
Jordan Brennan Author

In Bootstrap’s they certainly made improvements in this direction, but it’s an old pattern.