Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give forms and search fields proper ARIA roles #9352

Merged
merged 1 commit into from Aug 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions components.html
Expand Up @@ -532,7 +532,7 @@ <h4>Tooltips &amp; popovers in input groups require special setting</h4>
</div>

<h2 id="input-groups-basic">Basic input group</h2>
<form class="bs-example bs-example-form">
<form class="bs-example bs-example-form" role="form">
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Username">
Expand Down Expand Up @@ -569,7 +569,7 @@ <h2 id="input-groups-basic">Basic input group</h2>

<h2 id="input-groups-sizes">Optional sizes</h2>
<p>Add the relative form sizing classes to the <code>.input-group-addon</code>.</p>
<form class="bs-example bs-example-form">
<form class="bs-example bs-example-form" role="form">
<div class="input-group">
<span class="input-group-addon input-lg">@</span>
<input type="text" class="form-control input-lg" placeholder="Username">
Expand Down Expand Up @@ -692,7 +692,7 @@ <h2 id="input-groups-buttons">Buttons instead of text</h2>

<h2 id="input-groups-buttons-dropdowns">Buttons with dropdowns</h2>
<p></p>
<form class="bs-example bs-example-form">
<form class="bs-example bs-example-form" role="form">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
Expand Down Expand Up @@ -762,7 +762,7 @@ <h2 id="input-groups-buttons-dropdowns">Buttons with dropdowns</h2>
{% endhighlight %}

<h2 id="input-groups-buttons-segmented">Segmented dropdown groups</h2>
<form class="bs-example bs-example-form">
<form class="bs-example bs-example-form" role="form">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
Expand Down Expand Up @@ -1083,14 +1083,14 @@ <h3 id="navbar-forms">Forms</h3>
<div class="bs-example">

<nav class="navbar" role="navigation">
<form class="navbar-form pull-left">
<form class="navbar-form pull-left" role="form">
<input type="text" class="form-control" style="width: 200px;">
<button type="submit" class="btn btn-default">Submit</button>
</form>
</nav>

<nav class="navbar" role="navigation">
<form class="navbar-form pull-left">
<form class="navbar-form pull-left" role="form">
<select name="" id="" class="form-control" style="width: 200px;">
<option value="1">1</option>
<option value="2">2</option>
Expand All @@ -1102,15 +1102,15 @@ <h3 id="navbar-forms">Forms</h3>
</nav>

<nav class="navbar" role="navigation">
<form class="navbar-form pull-left">
<form class="navbar-form pull-left" role="form">
<input type="text" class="form-control" style="width: 200px;">
<input type="checkbox">
<button type="submit" class="btn btn-default">Submit</button>
</form>
</nav>

<nav class="navbar" role="navigation">
<form class="navbar-form pull-left">
<form class="navbar-form pull-left" role="form">
<input type="text" class="form-control" style="width: 200px;">
<label class="checkbox-inline">
<input type="checkbox"> Remember me
Expand All @@ -1121,7 +1121,7 @@ <h3 id="navbar-forms">Forms</h3>

</div><!-- /example -->
{% highlight html %}
<form class="navbar-form pull-left">
<form class="navbar-form pull-left" role="form">
<input type="text" class="form-control" style="width: 200px;">
<button type="submit" class="btn btn-default">Submit</button>
</form>
Expand Down Expand Up @@ -1285,8 +1285,8 @@ <h2 id="navbar-responsive">Responsive navbar</h2>
</ul>
</li>
</ul>
<form class="navbar-form pull-left" action="">
<input type="text" class="form-control col-lg-8" placeholder="Search">
<form class="navbar-form pull-left" action="" role="form">
<input type="text" class="form-control col-lg-8" placeholder="Search" role="search">
</form>
<ul class="nav navbar-nav pull-right">
<li><a href="#">Link</a></li>
Expand Down Expand Up @@ -1355,8 +1355,8 @@ <h2 id="navbar-scrollable">Scrollable responsive navbar</h2>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
<form class="navbar-form pull-left" action="">
<input type="text" class="form-control col-lg-8" placeholder="Search">
<form class="navbar-form pull-left" action="" role="form">
<input type="text" class="form-control col-lg-8" placeholder="Search" role="search">
</form>
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
Expand Down Expand Up @@ -1405,8 +1405,8 @@ <h2 id="navbar-inverted">Inverted variation</h2>
</ul>
</li>
</ul>
<form class="navbar-form pull-left" action="">
<input type="text" class="form-control col-lg-8" placeholder="Search">
<form class="navbar-form pull-left" action="" role="form">
<input type="text" class="form-control col-lg-8" placeholder="Search" role="search">
</form>
<ul class="nav navbar-nav pull-right">
<li><a href="#">Link</a></li>
Expand Down
14 changes: 7 additions & 7 deletions css.html
Expand Up @@ -1242,7 +1242,7 @@ <h1 id="forms">Forms</h1>

<h2 id="forms-example">Basic example</h2>
<p>Individual form controls automatically receive some global styling. All textual <code>&lt;input&gt;</code>, <code>&lt;textarea&gt;</code>, and <code>&lt;select&gt;</code> elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default. Wrap labels and controls in <code>.form-group</code> for optimum spacing.</p>
<form class="bs-example">
<form class="bs-example" role="form">
<fieldset>
<legend>Legend</legend>
<div class="form-group">
Expand All @@ -1267,7 +1267,7 @@ <h2 id="forms-example">Basic example</h2>
</fieldset>
</form><!-- /example -->
{% highlight html %}
<form>
<form role="form">
<fieldset>
<legend>Legend</legend>
<div class="form-group">
Expand Down Expand Up @@ -1304,7 +1304,7 @@ <h4>Requires custom widths</h4>
<h4>Always add labels</h4>
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class.</p>
</div>
<form class="bs-example form-inline">
<form class="bs-example form-inline" role="form">
<label class="sr-only" for="exampleInputEmail">Email address</label>
<input type="text" class="form-control" id="exampleInputEmail" placeholder="Enter email">
<label class="sr-only" for="exampleInputPassword">Password</label>
Expand All @@ -1317,7 +1317,7 @@ <h4>Always add labels</h4>
<button type="submit" class="btn btn-default">Sign in</button>
</form><!-- /example -->
{% highlight html %}
<form class="form-inline">
<form class="form-inline" role="form">
<label class="sr-only" for="exampleInputEmail">Email address</label>
<input type="text" class="form-control" id="exampleInputEmail" placeholder="Enter email">
<label class="sr-only" for="exampleInputPassword">Password</label>
Expand Down Expand Up @@ -1362,7 +1362,7 @@ <h2 id="forms-horizontal">Horizontal form</h2>
</div>
</form>
{% highlight html %}
<form class="form-horizontal">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="inputEmail" class="col-lg-2 control-label">Email</label>
<div class="col-lg-10">
Expand Down Expand Up @@ -1544,7 +1544,7 @@ <h2 id="forms-controls-static">Static text in horizontal forms</h2>
</div>
</form>
{% highlight html %}
<form class="form-horizontal">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="inputEmail2" class="col-lg-2 control-label">Email</label>
<div class="col-lg-10">
Expand Down Expand Up @@ -1616,7 +1616,7 @@ <h4>Cross-browser compatibility</h4>
</fieldset>
</form>
{% highlight html %}
<form class="form-inline">
<form class="form-inline" role="form">
<fieldset disabled>
<div class="form-group">
<label for="disabledInput">Disabled input</label>
Expand Down
2 changes: 1 addition & 1 deletion customize.html
Expand Up @@ -8,7 +8,7 @@

<!-- Customize
================================================== -->
<form class="bs-customizer">
<form class="bs-customizer" role="form">
<div class="bs-docs-section" id="less-section">
<div class="page-header">
<button class="btn btn-default toggle" type="button">Toggle all</button>
Expand Down