Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tania Allard <taniar.allard@gmail.com>
  • Loading branch information
drammock and trallard committed May 26, 2023
1 parent d4b37c6 commit 544f6ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ if (themeSwitchBtns.length) {
"list-group-item list-group-item-action py-1"
);
node.setAttribute("href", `${entry.url}${currentFilePath}`);
node.setAttribute("role", "menuitem");
node.setAttribute("role", "option");
node.appendChild(span);

// on click, AJAX calls will check if the linked page exists before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="versionswitcherbutton" type="button" class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-controls="versionswitchermenu">
<button id="versionswitcherbutton" type="button" class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="listbox" aria-controls="versionswitcherlist" aria-label="Version switcher list">
{{ theme_switcher.get('version_match') }} <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="versionswitchermenu" class="version-switcher__menu dropdown-menu list-group-flush py-0" role="menu" aria-labelledby="versionswitcherbutton">
<div id="versionswitcherlist" class="version-switcher__menu dropdown-menu list-group-flush py-0" role="listbox" tabindex=-1>
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions tests/test_build/navbar_switcher.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="versionswitcherbutton" type="button" class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-controls="versionswitchermenu">
<button id="versionswitcherbutton" type="button" class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="listbox" aria-controls="versionswitcherlist">
0.7.1 <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="versionswitchermenu" class="version-switcher__menu dropdown-menu list-group-flush py-0" role="menu" aria-labelledby="versionswitcherbutton">
<div id="versionswitchermlist" class="version-switcher__menu dropdown-menu list-group-flush py-0" role="listbox" aria-labelledby="versionswitcherbutton">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
Expand Down

0 comments on commit 544f6ba

Please sign in to comment.