]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Expand advice for optional icons with hidden labels
authorPatrick H. Lauke <redux@splintered.co.uk>
Mon, 8 Dec 2014 10:36:26 +0000 (10:36 +0000)
committerPatrick H. Lauke <redux@splintered.co.uk>
Mon, 8 Dec 2014 10:36:26 +0000 (10:36 +0000)
to clarify/hint that a ``<label class="sr-only">`` is not the only way
to do it

docs/_includes/css/forms.html

index 3ab202f7c99d72f3cf361167d74a98aa04f48e1f..d88498f8e164b868b2244f6948c68035e51c9953 100644 (file)
 {% endhighlight %}
 
   <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="form-group has-success has-feedback">
       <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>