Skip to content

Forms fixes: fieldset/legend, new .form-control-legend, accessibility advice #19277

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

Merged
merged 2 commits into from
Feb 25, 2016
Merged

Forms fixes: fieldset/legend, new .form-control-legend, accessibility advice #19277

merged 2 commits into from
Feb 25, 2016

Conversation

patrickhlauke
Copy link
Member

  • Add new .form-control-legend class (to style <legend> like <label> for inline etc forms)
  • More appropriate use of <fieldset> and <legend>
  • Added accessibility advice for hidden/no label alternatives

Supercedes #17266

@patrickhlauke
Copy link
Member Author

Note that even with this new pull request, the issue of having <legend> in the grid example is not completely solved.

capture

However, the issue here is not so much the new .form-control-legend, but rather the fact that the right-hand side of the grid, for the radio button and checkbox cases, lacks the same top padding of the previous two rows (email, password). So, it's something that should be addressed there, rather than trying to force a specific vertical padding on the <legend> there, I'd say.

@mdo I would propose to merge this, and then address the vertical inconsistency in #19141 ?

@patrickhlauke patrickhlauke mentioned this pull request Feb 19, 2016
5 tasks
@patrickhlauke
Copy link
Member Author

@mdo thoughts on this?

@cvrebert
Copy link
Collaborator

LGTM, modulo adding a TODO regarding the legend alignment.

@patrickhlauke
Copy link
Member Author

For completeness (as @cvrebert asked separately), this is how the <legend> on https://github.com/twbs/bootstrap/pull/19277/files#diff-582bb2b553026528f5f065d75a757c33R61 looks like after this.

capture

patrickhlauke added a commit that referenced this pull request Feb 25, 2016
Forms fixes: fieldset/legend, new .form-control-legend, accessibility advice
@patrickhlauke patrickhlauke merged commit 13194ad into twbs:v4-dev Feb 25, 2016
@mdo mdo mentioned this pull request Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants