Skip to content

Commit 424b185

Browse files
committed
fix: keep the new-tab announcement hidden in minimal HTML
1 parent 1747ea9 commit 424b185

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/resources/formats/html/templates/quarto-html-after-body.ejs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@
253253
if (!link.querySelector(".quarto-ext-newwindow")) {
254254
var newWindowNote = window.document.createElement("span");
255255
newWindowNote.classList.add("visually-hidden", "quarto-ext-newwindow");
256+
// minimal HTML ships no .visually-hidden rule
257+
newWindowNote.style.cssText = "border:0;clip:rect(0 0 0 0);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;";
256258
newWindowNote.textContent = " " + newWindowLabel;
257259
link.appendChild(newWindowNote);
258260
if (link.hasAttribute("aria-label")) {

0 commit comments

Comments
 (0)