Table of contents entries in the reference guide have no space between number and title for screen readers

Aperta Adatta ai principianti
#1,929 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, html, javascript

Direzione di ricerca

Apri wicket-user-guide/src/main/asciidoc/js/guide.js e leggi followSections(): suddivide ogni link del TOC in un span.toc-num più un nodo di testo e rimuove lo spazio bianco tra di essi. Mantieni lo spazio nel nodo di testo (ad es. aggiungi ' ' + match[2]), poi rimuovi il margin-right su .toc-num in wicket.css in modo che il vuoto visivo non raddoppi. Compila la guida e conferma che il TOC appare invariato e che il nome accessibile di un link sia "3. Why should I learn Wicket?". Coordinati con #1904, che modifica le stesse righe e dovrebbe essere integrato per primo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The entries in the reference guide's table of contents have no space between the section number and the title in their text. Screen readers announce them as, for example, "3.Why should I learn Wicket?" and "13.4.Pageable repeaters".

The cause is followSections() in wicket-user-guide/src/main/asciidoc/js/guide.js. It splits each TOC link into a span.toc-num holding the number and a text node holding the title, and drops the whitespace in between. The visual gap comes from margin-right on .toc-num in wicket.css, so on screen it looks fine, but the link's text content and accessible name have no space. This was introduced in #1845.

The same text ends up in other names built from the link. In #1904 the disclosure buttons are labelled "Sections for 3.Why should I learn Wicket?".

Fix: keep the space in the text when the link is split up. One way is to append ' ' + match[2] instead of match[2] and drop the margin-right from .toc-num. Then check that the TOC still looks the same and that the accessible names read "3. Why should I learn Wicket?".

This touches the same lines in guide.js as #1904, so it should wait until #1904 is merged.

Lingua principale
Java
Stelle
800
Fork
423
Merge medio
1g 1h
PR unite (30g)
170

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/wicket

Tutte le issue di apache/wicket

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.