a11y: lightbox link of an off-theme `.light-content` or `.dark-content` image stays focusable
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, scss
- Domínio
- accessibility, frontend
Direção de pesquisa
O relatório aponta para src/resources/filters/layout/lightbox.lua e src/resources/formats/html/_quarto-rules.scss; leia primeiro as regras de encapsulamento do lightbox e de ocultação de temas. Reproduza com o exemplo QMD fornecido e, em seguida, verifique se o link do tema desativado está oculto na ordem de tabulação do teclado e na árvore de acessibilidade, enquanto a imagem correspondente continua abrindo. Nenhum arquivo de teste é mencionado na issue.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 6.1k
- Forks
- 476
- Merge médio
- 17h 7min
- PRs com merge (30d)
- 112
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de quarto-dev/quarto-cli
-
enhancement websites
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
quarto-dev/quarto-cli#15255 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Website announcement dismiss control cannot be reached or used with a keyboardTalvez já em andamento @Xander-AJ assumiu hoje. Abertaaccessibility bug websites
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
quarto-dev/quarto-cli#15235 ·
Mantenedores costumam responder em até 1 dia
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch itTalvez já em andamento @sogav21 assumiu há 1 dia. Abertabug lua
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
quarto-dev/quarto-cli#15226 ·
Mantenedores costumam responder em até 1 dia
-
arrow-dark gives region markers a light band that fails contrastTalvez já em andamento @vav7 assumiu há 1 dia. Abertaaccessibility bug themes
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
quarto-dev/quarto-cli#15222 ·
Mantenedores costumam responder em até 1 dia
-
bug code-annotation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
quarto-dev/quarto-cli#15215 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de quarto-dev/quarto-cli
Issues semelhantes
-
neutral:fix
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
wazuh/wazuh-documentation#10611 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
remotion-dev/remotion#12905 ·
Mantenedores costumam responder em até 1 dia
-
Money fields reject amounts that aren't multiples of $500, so Find cliffs silently does nothingAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
PolicyEngine/cliff-watch#44 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia