aboutsummaryrefslogtreecommitdiff
path: root/_layouts/default.html
diff options
context:
space:
mode:
authoradamjacobbecker <[email protected]>2013-08-06 21:25:36 -0700
committeradamjacobbecker <[email protected]>2013-08-06 21:58:09 -0700
commita8d95d4721e714a7e1d683e14e997faa5ccddaff (patch)
tree13b2659725668e0dde39f1f15810a8303443aa16 /_layouts/default.html
parentd1e712d84882953b7d2a43a8e70aa3b976da5fcd (diff)
downloadbootstrap-a8d95d4721e714a7e1d683e14e997faa5ccddaff.tar.xz
bootstrap-a8d95d4721e714a7e1d683e14e997faa5ccddaff.zip
Improve accessibility (Section 508, WCAG)
This PR significantly improves Bootstrap's accessibility for users of assistive technology, such as screen readers. Some of the these changes add additional markup to the source examples, but we believe that the sacrifice in readability is worth achieving more widespread usage of accessibility best-practices. What was done - Added lots of [WAI-ARIA attributes](http://www.w3.org/WAI/intro/aria) - Added `.sr-only` helper class, that is only readable by screen readers (and invisible for all other users). This lets us - make progress bars and paginations accessible to screen reading users. - Advised users to always use label elements. For inline forms, they can hide them with `.sr-only` - Added 'Skip navigation' link - Added "Accessibility" section to getting-started.html. What *wasn't* done - Contrast issues (twbs#3572) - Tooltips (twbs#8469) - Documentation re: usage of icons, since they now live in a separate repo Major props to all that contributed: @bensheldon, @jasonlally, @criscristina, and @louh. Feel free to chime in, guys, if I've left anything out.
Diffstat (limited to '_layouts/default.html')
-rw-r--r--_layouts/default.html9
1 files changed, 5 insertions, 4 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 67b81b9e8..17431f91e 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -6,12 +6,13 @@
<!-- Place anything custom after this. -->
</head>
<body>
+ <a class="sr-only" href="#content">Skip navigation</a>
<!-- Docs master nav -->
{% include nav-main.html %}
<!-- Docs page layout -->
- <div class="bs-header">
+ <div class="bs-header" id="content" role="banner">
<div class="container">
<h1>{{ page.title }}</h1>
<p>{{ page.lead }}</p>
@@ -25,7 +26,7 @@
<div class="container bs-docs-container">
<div class="row">
<div class="col-lg-3">
- <div class="bs-sidebar">
+ <div class="bs-sidebar" role="complementary">
<ul class="nav bs-sidenav">
{% if page.slug == "getting-started" %}
{% include nav-getting-started.html %}
@@ -41,7 +42,7 @@
</ul>
</div>
</div>
- <div class="col-lg-9">
+ <div class="col-lg-9" role="main">
{{ content }}
</div>
</div>
@@ -50,7 +51,7 @@
<!-- Footer
================================================== -->
- <footer class="bs-footer">
+ <footer class="bs-footer" role="contentinfo">
{% include social-buttons.html %}
<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>