Focus falls to the body when a keyboard user dismisses the announcement bar
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- accessibility, frontend
Línea de trabajo
Empieza por el controlador de clics de src/resources/projects/website/navigation/quarto-nav.js, enlazado en el issue, e inspecciona cómo se elimina la barra de anuncios y dónde puede moverse el foco a continuación. Reproduce el caso reportado enfocando y haciendo clic en button.quarto-announcement-action; después, comprueba document.activeElement. El trabajo estará terminado cuando, al cerrar la barra, el foco permanezca en el siguiente elemento enfocable o, si no hay ninguno, en main con tabindex="-1".
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a keyboard user presses the dismiss button of the announcement bar, Quarto removes the bar, and the focused button goes with it.
Focus falls back to <body>, so the next Tab starts again from the top of the page.
A screen reader user loses their place too.
This fails WCAG 2.4.3 Focus Order (Level A).
#15253 made the control a button that works with the keyboard (#15235).
The click handler only hides the bar:
When the bar had focus, the handler should move focus to the next focusable element after the bar, or to <main> (with tabindex="-1") when there is none.
Steps to reproduce
_quarto.yml:
project:
type: website
website:
title: Announcement
navbar:
left:
- href: index.qmd
text: Home
announcement:
content: This is an announcement.
dismissable: true
format: html
index.qmd:
---
title: Home
---
Home page.
Render the website, open index.html, Tab to the dismiss button, and press Enter.
The same check in a script:
document.querySelector("button.quarto-announcement-action").focus();
document.querySelector("button.quarto-announcement-action").click();
document.activeElement.tagName;
Actual behavior
The bar is removed and document.activeElement is BODY.
Expected behavior
The bar is removed and focus is on a control that is still on the page, such as the next link in the navbar.
Your environment
- Quarto: 99.9.9 (development build, commit 83432c0).
- Browser: Chromium (Playwright).
- OS: macOS 27.2.1.
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.13.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 83432c028f6c07167c23f948da7067b37fe8a18b
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.2k
- Forks
- 492
- Merge medio
- 13 h 51 min
- PR fusionados (30 d)
- 82
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto-cli
-
accessibility bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15440 ·
Los mantenedores suelen responder en 1 día
-
accessibility bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
quarto-dev/quarto-cli#15438 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto-cli#15431 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bootstrap enhancement themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
quarto-dev/quarto-cli#15421 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
quarto-dev/quarto-cli#15408 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crxjs/chrome-extension-tools#1261 ·
-
support
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
01 type: bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
conorbronsdon/avoid-ai-writing#559 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
agentregistry-dev/website#69 ·