Skip to content

Commit

Permalink
[A11y] Package Manager tab on Package details reads as both selected …
Browse files Browse the repository at this point in the history
…and expanded (#9460)

* removed aria-expanded to tab item.

* remove expanded on bootstrap
  • Loading branch information
dannyjdev authored Apr 11, 2023
1 parent 0efa986 commit 58fec4c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/Bootstrap/dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2345,14 +2345,12 @@ if (typeof jQuery === 'undefined') {
.end()
.find('[data-toggle="tab"]')
.attr('tabindex', "-1")
.attr('aria-expanded', false)
.attr('aria-selected', false)

element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('tabindex', "0")
.attr('aria-expanded', true)
.attr('aria-selected', true)

if (transition) {
Expand Down
2 changes: 0 additions & 2 deletions src/Bootstrap/js/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@
.end()
.find('[data-toggle="tab"]')
.attr('tabindex', "-1")
.attr('aria-expanded', false)
.attr('aria-selected', false)

element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('tabindex', "0")
.attr('aria-expanded', true)
.attr('aria-selected', true)

if (transition) {
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
@helper CommandTab(PackageManagerViewModel packageManager, bool active)
{
<li role="presentation" class="@(active ? "active" : string.Empty)">
<a href="#@packageManager.Id" aria-expanded="@(active ? "true" : "false")"
<a href="#@packageManager.Id"
id="@packageManager.Id-tab" class="package-manager-tab"
aria-selected="@(active ? "true" : "false")" tabindex="@(active ? "0" : "-1")"
aria-controls="@packageManager.Id" role="tab" data-toggle="tab"
Expand Down

0 comments on commit 58fec4c

Please sign in to comment.