Skip to content

Commit

Permalink
place href attribute before data attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed May 5, 2021
1 parent 91641cd commit 7f81a7c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
6 changes: 4 additions & 2 deletions R/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,10 @@ buildNavItem <- function(divTag, tabsetId, index) {
liTag <- function(id, title, value, icon) {
tags$li(
tags$a(
`data-toggle` = "tab", `data-value` = value,
href = paste0("#", id), icon, title
href = paste0("#", id),
`data-toggle` = "tab",
`data-value` = value,
icon, title
)
)
}
Expand Down
56 changes: 28 additions & 28 deletions tests/testthat/_snaps/tabPanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<div class="tabbable">
<ul class="nav nav-tabs" data-tabsetid="4785">
<li class="active">
<a data-toggle="tab" data-value="A" href="#tab-4785-1">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A">A</a>
</li>
<li>
<a data-toggle="tab" data-value="B" href="#tab-4785-2">
<a href="#tab-4785-2" data-toggle="tab" data-value="B">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -21,7 +21,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li>
<a data-toggle="tab" data-value="C" href="#tab-1502-1">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C">C</a>
</li>
</ul>
</li>
Expand All @@ -41,10 +41,10 @@
<div class="tabbable">
<ul class="nav nav-pills" data-tabsetid="4785">
<li>
<a data-toggle="tab" data-value="A" href="#tab-4785-1">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A">A</a>
</li>
<li class="active">
<a data-toggle="tab" data-value="B" href="#tab-4785-2">
<a href="#tab-4785-2" data-toggle="tab" data-value="B">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -56,7 +56,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li>
<a data-toggle="tab" data-value="C" href="#tab-1502-1">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C">C</a>
</li>
</ul>
</li>
Expand All @@ -78,10 +78,10 @@
<div class="tabbable">
<ul class="nav nav-tabs" data-tabsetid="4785">
<li class="nav-item">
<a data-toggle="tab" data-value="A" href="#tab-4785-1" class="nav-link active">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A" class="nav-link active">A</a>
</li>
<li class="nav-item">
<a data-toggle="tab" data-value="B" href="#tab-4785-2" class="nav-link">
<a href="#tab-4785-2" data-toggle="tab" data-value="B" class="nav-link">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -93,7 +93,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li class="nav-item">
<a data-toggle="tab" data-value="C" href="#tab-1502-1" class="dropdown-item">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C" class="dropdown-item">C</a>
</li>
</ul>
</li>
Expand All @@ -113,10 +113,10 @@
<div class="tabbable">
<ul class="nav nav-pills" data-tabsetid="4785">
<li class="nav-item">
<a data-toggle="tab" data-value="A" href="#tab-4785-1" class="nav-link">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A" class="nav-link">A</a>
</li>
<li class="nav-item">
<a data-toggle="tab" data-value="B" href="#tab-4785-2" class="nav-link active">
<a href="#tab-4785-2" data-toggle="tab" data-value="B" class="nav-link active">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -128,7 +128,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li class="nav-item">
<a data-toggle="tab" data-value="C" href="#tab-1502-1" class="dropdown-item">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C" class="dropdown-item">C</a>
</li>
</ul>
</li>
Expand All @@ -154,10 +154,10 @@
</div>
<ul class="nav navbar-nav" data-tabsetid="4785">
<li class="active">
<a data-toggle="tab" data-value="A" href="#tab-4785-1">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A">A</a>
</li>
<li>
<a data-toggle="tab" data-value="B" href="#tab-4785-2">
<a href="#tab-4785-2" data-toggle="tab" data-value="B">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -169,7 +169,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li>
<a data-toggle="tab" data-value="C" href="#tab-1502-1">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C">C</a>
</li>
</ul>
</li>
Expand All @@ -196,10 +196,10 @@
</div>
<ul class="nav navbar-nav" data-tabsetid="4785">
<li class="nav-item">
<a data-toggle="tab" data-value="A" href="#tab-4785-1" class="nav-link active">A</a>
<a href="#tab-4785-1" data-toggle="tab" data-value="A" class="nav-link active">A</a>
</li>
<li class="nav-item">
<a data-toggle="tab" data-value="B" href="#tab-4785-2" class="nav-link">
<a href="#tab-4785-2" data-toggle="tab" data-value="B" class="nav-link">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -211,7 +211,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li class="nav-item">
<a data-toggle="tab" data-value="C" href="#tab-1502-1" class="dropdown-item">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C" class="dropdown-item">C</a>
</li>
</ul>
</li>
Expand All @@ -236,10 +236,10 @@
<ul class="nav nav-pills nav-stacked" data-tabsetid="4785">
<li class="navbar-brand">A header</li>
<li class="active">
<a data-toggle="tab" data-value="A" href="#tab-4785-2">A</a>
<a href="#tab-4785-2" data-toggle="tab" data-value="A">A</a>
</li>
<li>
<a data-toggle="tab" data-value="B" href="#tab-4785-3">
<a href="#tab-4785-3" data-toggle="tab" data-value="B">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -251,7 +251,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li>
<a data-toggle="tab" data-value="C" href="#tab-1502-1">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C">C</a>
</li>
</ul>
</li>
Expand All @@ -276,10 +276,10 @@
<ul class="nav nav-pills nav-stacked" data-tabsetid="4785">
<li class="navbar-brand">A header</li>
<li class="nav-item">
<a data-toggle="tab" data-value="A" href="#tab-4785-2" class="nav-link active">A</a>
<a href="#tab-4785-2" data-toggle="tab" data-value="A" class="nav-link active">A</a>
</li>
<li class="nav-item">
<a data-toggle="tab" data-value="B" href="#tab-4785-3" class="nav-link">
<a href="#tab-4785-3" data-toggle="tab" data-value="B" class="nav-link">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -291,7 +291,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li class="nav-item">
<a data-toggle="tab" data-value="C" href="#tab-1502-1" class="dropdown-item">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C" class="dropdown-item">C</a>
</li>
</ul>
</li>
Expand All @@ -314,13 +314,13 @@
<div class="tabbable">
<ul class="nav nav-tabs" data-tabsetid="4785">
<li class="active">
<a data-toggle="tab" href="#tab-4785-1"></a>
<a href="#tab-4785-1" data-toggle="tab"></a>
</li>
<li>
<a data-toggle="tab" data-value="A" href="#tab-4785-2">A</a>
<a href="#tab-4785-2" data-toggle="tab" data-value="A">A</a>
</li>
<li>
<a data-toggle="tab" data-value="B" href="#tab-4785-3">
<a href="#tab-4785-3" data-toggle="tab" data-value="B">
<i class=" fab fa-github fa-fw" role="presentation" aria-label=" icon"></i>
B
</a>
Expand All @@ -332,7 +332,7 @@
</a>
<ul class="dropdown-menu" data-tabsetid="1502">
<li>
<a data-toggle="tab" data-value="C" href="#tab-1502-1">C</a>
<a href="#tab-1502-1" data-toggle="tab" data-value="C">C</a>
</li>
</ul>
</li>
Expand Down

0 comments on commit 7f81a7c

Please sign in to comment.