0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Add aria-expanded and aria-controls to docs navbar toggle

Also, use id rather class name for the navigation, as it's unique and
lets us use correct aria-controls (and without the use of id,
aria-expanded does not get updated correctly by the current dropdown
toggle script)
This commit is contained in:
Patrick H. Lauke 2015-03-24 10:32:53 +00:00
parent dc4aa004d4
commit 04280335f6

View File

@ -1,7 +1,7 @@
<header class="navbar navbar-static-top bs-docs-nav" id="top" role="banner">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -9,7 +9,7 @@
</button>
<a href="../" class="navbar-brand">Bootstrap</a>
</div>
<nav class="collapse navbar-collapse bs-navbar-collapse">
<nav id="bs-navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li{% if page.slug == "getting-started" %} class="active"{% endif %}>
<a href="../getting-started/">Getting started</a>