Skip to content

Commit

Permalink
Fix pop-out button without id and wrong ARIA-ROLE
Browse files Browse the repository at this point in the history
  • Loading branch information
henrif75 committed Jan 11, 2025
1 parent c04d286 commit 29cd51d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@

<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
Expand Down
2 changes: 2 additions & 0 deletions theme/speaker-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
popOutLocation.hash = "#speaker-notes-open";
let popOut = document.createElement("button");
popOut.classList.add("icon-button", "pop-out");
popOut.setAttribute("title", "Open speaker notes in a new window");
popOut.setAttribute("aria-label", "Open speaker notes in a new window");
popOut.addEventListener("click", (event) => {
let popup = window.open(popOutLocation.href, "speakerNotes", "popup");
if (popup) {
Expand Down

0 comments on commit 29cd51d

Please sign in to comment.