Default error pages get the session's lang on English text

Aperta Adatta ai principianti
#1,924 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
html, java
Ambito
accessibility

Direzione di ricerca

Le quattro pagine si trovano nel package markup.html pages (PageExpiredErrorPage, AccessDeniedPage, InternalErrorPage, ExceptionErrorPage) e estendono tutte WebPage. Leggi prima WebPage#onHtmlTag per confermare che un lang di markup prevale sulla locale della sessione e sopprime dir, poi aggiungi lang="en" al tag <html> in ogni pagina e sostituisci il doctype HTML 4.01 Transitional con <!DOCTYPE html>. Fatto significa che ogni pagina renderizza testo in inglese con lang="en" e senza dir anche quando la locale della sessione è nl-NL o RTL; controlla i test esistenti sul markup delle pagine per capire come viene verificato il tag renderizzato.

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

Descrizione

Since #1870, every WebPage gets lang and dir on its <html> tag from the page locale. Wicket's default error pages extend WebPage, but their text is hard-coded English and they have no resource bundles:

  • PageExpiredErrorPage
  • AccessDeniedPage
  • InternalErrorPage
  • ExceptionErrorPage

A user whose session locale is nl-NL now gets <html lang="nl-NL" dir="ltr"> on a page that reads "Page Expired". Before #1870, lang was missing. Now it is wrong: screen readers read the English text with Dutch pronunciation, which fails WCAG 2.2 SC 3.1.1 (Language of Page, level A). A user with an RTL locale also gets dir="rtl" on English text.

The pages also still use the HTML 4.01 Transitional doctype.

Possible fix: put lang="en" on the <html> tag of these four pages. A markup lang takes precedence in WebPage#onHtmlTag and also suppresses dir. Replace the doctype with <!DOCTYPE html> at the same time. Translating the pages through resource bundles and dropping the markup lang would be the alternative, but contributed translations for them don't exist yet.

The accessibility chapter of the user guide (#1847) recommends replacing these pages with application pages and mentions this behaviour.

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.