Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider to make add_settings_section() optionally output a fieldset #14

Open
afercia opened this issue Apr 24, 2017 · 4 comments
Open

Comments

@afercia
Copy link
Contributor

afercia commented Apr 24, 2017

There are cases where it would be worth grouping multiple fields within a fieldset element with a legend. Should add_settings_section() optionally output a fieldset with legend?

@felixarntz
Copy link
Contributor

If it is fine to allow fieldsets with another fieldset within (consider a fieldset section which has a radio field inside), I think this is a valuable enhancement.

@afercia
Copy link
Contributor Author

afercia commented Apr 29, 2017

If it is fine to allow fieldsets with another fieldset within

It is allowed but not recommended for accessibility.
https://accessibility.blog.gov.uk/2016/07/22/using-the-fieldset-and-legend-elements/

It is possible to nest one <fieldset> element inside another, but it is not recommended. Screen readers do not automatically indicate the end of the <fieldset> element, so it is impossible for screen reader users to confidently know which fields belong within which fieldset.

@felixarntz
Copy link
Contributor

Not sure whether we should allow that then. I wouldn't like to add complex logic to disallow using fields that require fieldsets (radio for example) in fieldset sections.
So it depends on whether we want to open up that possibility and risk accessibility issues, but on the other hand provide more flexibility.

@afercia
Copy link
Contributor Author

afercia commented May 1, 2017

Yep personally I'd prefer more flexibility and rely on devs education to avoid nested fieldsets (some documentation could help too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants