2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Improve accessibility of close buttons in modals & alerts

Adds textual caption to the close buttons. The "X" multiplication sign isn't very meaningful to screenreaders.

Credit: https://github.com/paypal/bootstrap-accessibility-plugin
Per:
    https://github.com/paypal/bootstrap-accessibility-plugin/blob/master/README.md#alert
    https://github.com/paypal/bootstrap-accessibility-plugin/blob/master/README.md#modal-dialog
This commit is contained in:
Chris Rebert
2014-05-03 19:38:09 -07:00
parent bae289d1fe
commit 949b81f511
4 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -48,10 +48,10 @@
<h3 id="helper-classes-close">Close icon</h3>
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
<div class="bs-example">
<p><button type="button" class="close" aria-hidden="true">&times;</button></p>
<p><button type="button" class="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button></p>
</div>
{% highlight html %}
<button type="button" class="close" aria-hidden="true">&times;</button>
<button type="button" class="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
{% endhighlight %}