Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
4683beee
Commit
4683beee
authored
Jul 08, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14085 from twbs/tab-lis-role-preso
add role="presentation" to tab <li>s to improve accessibility
parents
a53be21b
5c1f4e1a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
67 deletions
+67
-67
docs/_includes/components/badges.html
docs/_includes/components/badges.html
+7
-7
docs/_includes/components/navs.html
docs/_includes/components/navs.html
+33
-33
docs/_includes/js/dropdowns.html
docs/_includes/js/dropdowns.html
+4
-4
docs/_includes/js/tabs.html
docs/_includes/js/tabs.html
+11
-11
docs/examples/jumbotron-narrow/index.html
docs/examples/jumbotron-narrow/index.html
+3
-3
docs/examples/theme/index.html
docs/examples/theme/index.html
+9
-9
No files found.
docs/_includes/components/badges.html
View file @
4683beee
...
...
@@ -22,20 +22,20 @@
<p>
Built-in styles are included for placing badges in active states in pill navigations.
</p>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
<span
class=
"badge"
>
42
</span></a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
<span
class=
"badge"
>
3
</span></a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
<span
class=
"badge"
>
42
</span></a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
<span
class=
"badge"
>
3
</span></a></li>
</ul>
<br>
<ul
class=
"nav nav-pills nav-stacked"
role=
"tablist"
style=
"max-width: 260px;"
>
<li
class=
"active"
>
<li
role=
"presentation"
class=
"active"
>
<a
href=
"#"
>
<span
class=
"badge pull-right"
>
42
</span>
Home
</a>
</li>
<li><a
href=
"#"
>
Profile
</a></li>
<li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
>
<a
href=
"#"
>
<span
class=
"badge pull-right"
>
3
</span>
Messages
...
...
@@ -49,7 +49,7 @@
</div>
{% highlight html %}
<ul
class=
"nav nav-pills nav-stacked"
role=
"tablist"
>
<li
class=
"active"
>
<li
role=
"presentation"
class=
"active"
>
<a
href=
"#"
>
<span
class=
"badge pull-right"
>
42
</span>
Home
...
...
docs/_includes/components/navs.html
View file @
4683beee
...
...
@@ -7,16 +7,16 @@
<p>
Note the
<code>
.nav-tabs
</code>
class requires the
<code>
.nav
</code>
base class.
</p>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
</div>
{% highlight html %}
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
{% endhighlight %}
<div
class=
"bs-callout bs-callout-info"
>
...
...
@@ -28,24 +28,24 @@
<p>
Take that same HTML, but use
<code>
.nav-pills
</code>
instead:
</p>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
</div>
{% highlight html %}
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
{% endhighlight %}
<p>
Pills are also vertically stackable. Just add
<code>
.nav-stacked
</code>
.
</p>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills nav-stacked"
role=
"tablist"
style=
"max-width: 300px;"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
</div>
{% highlight html %}
...
...
@@ -63,15 +63,15 @@
</div>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-tabs nav-justified"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
<br>
<ul
class=
"nav nav-pills nav-justified"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
</div>
{% highlight html %}
...
...
@@ -94,15 +94,15 @@
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li><a
href=
"#"
>
Clickable link
</a></li>
<li><a
href=
"#"
>
Clickable link
</a></li>
<li
class=
"disabled"
><a
href=
"#"
>
Disabled link
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Clickable link
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Clickable link
</a></li>
<li
role=
"presentation"
class=
"disabled"
><a
href=
"#"
>
Disabled link
</a></li>
</ul>
</div>
{% highlight html %}
<ul
class=
"nav nav-pills"
role=
"tablist"
>
...
<li
class=
"disabled"
><a
href=
"#"
>
Disabled link
</a></li>
<li
role=
"presentation"
class=
"disabled"
><a
href=
"#"
>
Disabled link
</a></li>
...
</ul>
{% endhighlight %}
...
...
@@ -114,9 +114,9 @@
<h3>
Tabs with dropdowns
</h3>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Help
</a></li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Help
</a></li>
<li
role=
"presentation"
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown
<span
class=
"caret"
></span>
</a>
...
...
@@ -133,7 +133,7 @@
{% highlight html %}
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
...
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown
<span
class=
"caret"
></span>
</a>
...
...
@@ -148,9 +148,9 @@
<h3>
Pills with dropdowns
</h3>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Help
</a></li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Help
</a></li>
<li
role=
"presentation"
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown
<span
class=
"caret"
></span>
</a>
...
...
@@ -167,7 +167,7 @@
{% highlight html %}
<ul
class=
"nav nav-pills"
role=
"tablist"
>
...
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown
<span
class=
"caret"
></span>
</a>
...
...
docs/_includes/js/dropdowns.html
View file @
4683beee
...
...
@@ -60,8 +60,8 @@
<h3>
Within pills
</h3>
<div
class=
"bs-example"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Regular link
</a></li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Regular link
</a></li>
<li
role=
"presentation"
class=
"dropdown"
>
<a
id=
"drop4"
role=
"button"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown
<span
class=
"caret"
></span></a>
<ul
id=
"menu1"
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"drop4"
>
<li
role=
"presentation"
><a
role=
"menuitem"
tabindex=
"-1"
href=
"http://twitter.com/fat"
>
Action
</a></li>
...
...
@@ -71,7 +71,7 @@
<li
role=
"presentation"
><a
role=
"menuitem"
tabindex=
"-1"
href=
"http://twitter.com/fat"
>
Separated link
</a></li>
</ul>
</li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"dropdown"
>
<a
id=
"drop5"
role=
"button"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown 2
<span
class=
"caret"
></span></a>
<ul
id=
"menu2"
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"drop5"
>
<li
role=
"presentation"
><a
role=
"menuitem"
tabindex=
"-1"
href=
"http://twitter.com/fat"
>
Action
</a></li>
...
...
@@ -81,7 +81,7 @@
<li
role=
"presentation"
><a
role=
"menuitem"
tabindex=
"-1"
href=
"http://twitter.com/fat"
>
Separated link
</a></li>
</ul>
</li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"dropdown"
>
<a
id=
"drop6"
role=
"button"
data-toggle=
"dropdown"
href=
"#"
>
Dropdown 3
<span
class=
"caret"
></span></a>
<ul
id=
"menu3"
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"drop6"
>
<li
role=
"presentation"
><a
role=
"menuitem"
tabindex=
"-1"
href=
"http://twitter.com/fat"
>
Action
</a></li>
...
...
docs/_includes/js/tabs.html
View file @
4683beee
...
...
@@ -5,9 +5,9 @@
<p>
Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.
</p>
<div
class=
"bs-example bs-example-tabs"
>
<ul
id=
"myTab"
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li
role=
"presentation"
class=
"dropdown"
>
<a
href=
"#"
id=
"myTabDrop1"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
Dropdown
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"myTabDrop1"
>
<li><a
href=
"#dropdown1"
tabindex=
"-1"
role=
"tab"
data-toggle=
"tab"
>
@fat
</a></li>
...
...
@@ -61,10 +61,10 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
{% highlight html %}
<!-- Nav tabs -->
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li><a
href=
"#messages"
role=
"tab"
data-toggle=
"tab"
>
Messages
</a></li>
<li><a
href=
"#settings"
role=
"tab"
data-toggle=
"tab"
>
Settings
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#messages"
role=
"tab"
data-toggle=
"tab"
>
Messages
</a></li>
<li
role=
"presentation"
><a
href=
"#settings"
role=
"tab"
data-toggle=
"tab"
>
Settings
</a></li>
</ul>
<!-- Tab panes -->
...
...
@@ -94,10 +94,10 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
</p>
{% highlight html %}
<ul
class=
"nav nav-tabs"
role=
"tablist"
id=
"myTab"
>
<li
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li><a
href=
"#messages"
role=
"tab"
data-toggle=
"tab"
>
Messages
</a></li>
<li><a
href=
"#settings"
role=
"tab"
data-toggle=
"tab"
>
Settings
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#messages"
role=
"tab"
data-toggle=
"tab"
>
Messages
</a></li>
<li
role=
"presentation"
><a
href=
"#settings"
role=
"tab"
data-toggle=
"tab"
>
Settings
</a></li>
</ul>
<div
class=
"tab-content"
>
...
...
docs/examples/jumbotron-narrow/index.html
View file @
4683beee
...
...
@@ -35,9 +35,9 @@
<div
class=
"container"
>
<div
class=
"header"
>
<ul
class=
"nav nav-pills pull-right"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
About
</a></li>
<li><a
href=
"#"
>
Contact
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
About
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Contact
</a></li>
</ul>
<h3
class=
"text-muted"
>
Project name
</h3>
</div>
...
...
docs/examples/theme/index.html
View file @
4683beee
...
...
@@ -339,9 +339,9 @@
<a
href=
"#"
>
Inbox
<span
class=
"badge"
>
42
</span></a>
</p>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
<span
class=
"badge"
>
42
</span></a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
<span
class=
"badge"
>
3
</span></a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
<span
class=
"badge"
>
42
</span></a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
<span
class=
"badge"
>
3
</span></a></li>
</ul>
...
...
@@ -365,14 +365,14 @@
<h1>
Navs
</h1>
</div>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#"
>
Profile
</a></li>
<li><a
href=
"#"
>
Messages
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Profile
</a></li>
<li
role=
"presentation"
><a
href=
"#"
>
Messages
</a></li>
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment