a11y: lightbox link of an off-theme `.light-content` or `.dark-content` image stays focusable
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
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, scss
- Área
- accessibility, frontend
Línea de trabajo
El informe apunta a src/resources/filters/layout/lightbox.lua y src/resources/formats/html/_quarto-rules.scss; lee primero las reglas de envoltura de lightbox y de ocultación de temas. Reproduce el comportamiento con el ejemplo QMD proporcionado y luego verifica que el enlace del tema desactivado esté oculto en el orden de tabulación del teclado y en el árbol de accesibilidad, mientras la imagen correspondiente sigue abriéndose. En el issue no se menciona ningún archivo de prueba.
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
With a light and a dark version of an image, Quarto hides the one that does not match the colour scheme, but it leaves the lightbox link around it.
The hidden image's link is zero-size and invisible, yet it stays in the keyboard tab order, and pressing Enter on it opens the lightbox with the image from the other colour scheme.
Keyboard users tab onto an element they cannot see.
The lightbox filter wraps every lightbox image in an <a class="lightbox"> and puts no theme class on the link.
The stylesheet hides the image with display: none !important, and the rule only matches the image.
#14691 describes the same pattern for the dashboard navbar logo.
Steps to reproduce
---
title: "Lightbox light and dark test"
lightbox: auto
format:
html:
theme:
light: default
dark: darkly
---
{.light-content}
{.dark-content}
Render it, press Tab until the focus reaches the second image in light mode, then press Enter.
Actual behavior
The output contains one link per image, and the link of the off-theme image measures 0 by 0:
<a href="dark.svg" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Dark version"><img src="dark.svg" class="dark-content img-fluid figure-img" alt="Dark version"></a>
In light mode the tab order is: skip link, light image link, dark image link (invisible), lightbox close button.
In dark mode it is the same with the roles swapped.
Enter on the invisible link opens the lightbox with the hidden image.
Expected behavior
The link of the hidden image is hidden with it, so it leaves the tab order and the accessibility tree.
Your environment
- IDE: none, terminal only
- OS: macOS (Darwin 27.0.0, Apple Silicon)
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.7.14: OK
Typst version 0.15.1: OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 69592e5c1718d3e1b2f3d11e757d32e23a16af67
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.1k
- Forks
- 478
- Merge medio
- 17 h 7 min
- PR fusionados (30 d)
- 112
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
-
enhancement websites
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15255 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Website announcement dismiss control cannot be reached or used with a keyboardPosiblemente ocupada @Xander-AJ la tomó hoy. Abiertoaccessibility bug websites
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
quarto-dev/quarto-cli#15235 ·
Los mantenedores suelen responder en 1 día
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch itPosiblemente ocupada @sogav21 la tomó hace 2 días. Abiertobug lua
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto-cli#15226 ·
Los mantenedores suelen responder en 1 día
-
arrow-dark gives region markers a light band that fails contrastPosiblemente ocupada @vav7 la tomó hace 1 día. Abiertoaccessibility bug themes
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
quarto-dev/quarto-cli#15222 ·
Los mantenedores suelen responder en 1 día
-
bug code-annotation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/quarto-cli#15215 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LucasSantana-Dev/Lucky#2945 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
brijeshb42/monaco-vim#175 ·
-
good first issue
Dificultad 2/5 3-5 días Aptitud para principiantes 62/100
paipai1999/POS-system#3 ·
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
r-afael/better-yt-recommendations#36 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
microsoft/playwright#43875 · 1 comentario ·
Los mantenedores suelen responder en 1 día