0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

Expand advice for optional icons with hidden labels

to clarify/hint that a ``<label class="sr-only">`` is not the only way
to do it
This commit is contained in:
Patrick H. Lauke 2014-12-08 10:36:26 +00:00
parent deffd946ef
commit 52e4b87b5a

View File

@ -764,7 +764,7 @@
{% endhighlight %} {% endhighlight %}
<h4>Optional icons with hidden <code>.sr-only</code> labels</h4> <h4>Optional icons with hidden <code>.sr-only</code> labels</h4>
<p>For form controls with no visible label, add the <code>.sr-only</code> class on the label. Bootstrap will automatically adjust the position of the icon once it's been added.</p> <p>If you use the <code>.sr-only</code> class to hide a form control's <code>&lt;label&gt;</code> (rather than using other labelling options, such as the <code>aria-label</code> attribute), Bootstrap will automatically adjust the position of the icon once it's been added.</p>
<div class="bs-example" data-example-id="form-validation-state-with-icon-without-label"> <div class="bs-example" data-example-id="form-validation-state-with-icon-without-label">
<div class="form-group has-success has-feedback"> <div class="form-group has-success has-feedback">
<label class="control-label sr-only" for="inputSuccess5">Hidden label</label> <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>