From a8d95d4721e714a7e1d683e14e997faa5ccddaff Mon Sep 17 00:00:00 2001 From: adamjacobbecker Date: Tue, 6 Aug 2013 21:25:36 -0700 Subject: 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. --- components.html | 126 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 75 insertions(+), 51 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index b39385241..b09431625 100644 --- a/components.html +++ b/components.html @@ -1020,7 +1020,7 @@ base_url: "../"

To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container, which sets the width of your site and content.

- {% highlight html %} - -- cgit v1.2.3 From 0b9efa95656a4f04b3bf09d55727fcfa9158e65a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Aug 2013 13:20:24 -0700 Subject: fix indentation --- components.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index b61d1997e..27bd81ccb 100644 --- a/components.html +++ b/components.html @@ -955,8 +955,8 @@ base_url: "../"
  • Separated link
  • - - + +
    {% highlight html %} -- cgit v1.2.3 From a88888aaeb9c0f0138abbf7824a55aa51c394ea9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Aug 2013 14:49:50 -0700 Subject: fix broken components page, also likely from @kevinsuttle's #9332 --- components.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index 27bd81ccb..8a10b21f8 100644 --- a/components.html +++ b/components.html @@ -1179,7 +1179,7 @@ base_url: "../"

    Add .navbar-fixed-top.

    - +
    {% highlight html %} {% highlight html %} {% highlight html %} - - + {% endhighlight %} -- cgit v1.2.3 From a86f5d24f8ce1c0ce06be74ed3602fbb83ea6594 Mon Sep 17 00:00:00 2001 From: Kevin Suttle Date: Sun, 11 Aug 2013 21:41:31 -0400 Subject: Give forms and search fields proper ARIA roles http://blog.paciellogroup.com/2013/02/using-wai-aria-landmarks-2013/#tablex http://www.w3.org/TR/wai-aria/roles#form http://www.w3.org/TR/wai-aria/roles#search --- components.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index 8a10b21f8..ea75fe32d 100644 --- a/components.html +++ b/components.html @@ -532,7 +532,7 @@ base_url: "../"

    Basic input group

    -
    +
    @ @@ -569,7 +569,7 @@ base_url: "../"

    Optional sizes

    Add the relative form sizing classes to the .input-group-addon.

    - +
    @ @@ -692,7 +692,7 @@ base_url: "../"

    Buttons with dropdowns

    - +
    @@ -762,7 +762,7 @@ base_url: "../" {% endhighlight %}

    Segmented dropdown groups

    - +
    @@ -1083,14 +1083,14 @@ base_url: "../"
    {% highlight html %} - + @@ -1285,8 +1285,8 @@ body { padding-bottom: 70px; } - -
    @@ -1405,8 +1405,8 @@ body { padding-bottom: 70px; } -

    Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.

    -

    Default alert

    +

    Default alert

    Wrap any text and an optional dismiss button in .alert for a basic warning alert message.

    -
    -

    Ensure proper behavior across all devices

    -

    Be sure to use the <button> element with the data-dismiss="alert" data attribute.

    -
    -
    - Warning! Best check yo self, you're not looking too good.
    {% highlight html %}
    - Warning! Best check yo self, you're not looking too good.
    {% endhighlight %} -

    Contextual alternatives

    +

    Contextual alternatives

    Add optional classes to change an alert's connotation.

    - Oh snap! Change a few things up and try submitting again.
    - Well done! You successfully read this important alert message.
    - Heads up! This alert needs your attention, but it's not super important.
    @@ -1923,19 +1913,36 @@ body { padding-bottom: 70px; }
    ...
    {% endhighlight %} - +

    Dismissable alerts

    +

    Build on any alert by adding an optional .alert-dismissable and close button.

    +
    +
    + + Warning! Best check yo self, you're not looking too good. +
    +
    +{% highlight html %} +
    + + Warning! Best check yo self, you're not looking too good. +
    +{% endhighlight %} + +
    +

    Ensure proper behavior across all devices

    +

    Be sure to use the <button> element with the data-dismiss="alert" data attribute.

    +
    + +

    Use the .alert-link utility class to quickly provide matching colored links within any alert.

    - Oh snap! Change a few things up and try submitting again.
    - Well done! You successfully read this important alert message.
    - Heads up! This alert needs your attention, but it's not super important.
    -- cgit v1.2.3 From 5e73cc90d9104dc251fba5dcaf203523785ee9a5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 01:39:43 -0700 Subject: fixes #9266 manually on account of list group file reorganization --- components.html | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index 4364af0be..4c52d59f3 100644 --- a/components.html +++ b/components.html @@ -2289,14 +2289,10 @@ body { padding-bottom: 70px; } Cras justo odio - Dapibus ac facilisis in - - Morbi leo risus - - Porta ac consectetur ac - - Vestibulum at eros - + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros
    {% highlight html %} @@ -2304,14 +2300,10 @@ body { padding-bottom: 70px; } Cras justo odio - Dapibus ac facilisis in - - Morbi leo risus - - Porta ac consectetur ac - - Vestibulum at eros - + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros
    {% endhighlight %} -- cgit v1.2.3 From 38b2083f3cfd41711260a3b847e58594750a31eb Mon Sep 17 00:00:00 2001 From: Bas Bosman Date: Mon, 12 Aug 2013 17:19:55 +0200 Subject: Aria role search instead of form --- components.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'components.html') diff --git a/components.html b/components.html index 4c52d59f3..00bd56bf1 100644 --- a/components.html +++ b/components.html @@ -1285,8 +1285,8 @@ body { padding-bottom: 70px; } - -
    @@ -1405,8 +1405,8 @@ body { padding-bottom: 70px; } - - -