Default error pages get the session's lang on English text
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- html, java
- Domain
- accessibility
Research direction
The four pages live in the markup.html pages package (PageExpiredErrorPage, AccessDeniedPage, InternalErrorPage, ExceptionErrorPage) and all extend WebPage. Read WebPage#onHtmlTag first to confirm a markup lang wins over the session locale and suppresses dir, then add lang="en" to the <html> tag in each page and swap the HTML 4.01 Transitional doctype for <!DOCTYPE html>. Done means each page renders English text with lang="en" and no dir even when the session locale is nl-NL or RTL; check existing page markup tests for how the rendered tag is asserted.
Written by the indexing model from the issue text.
Description
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:
PageExpiredErrorPageAccessDeniedPageInternalErrorPageExceptionErrorPage
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.
- Dominant language
- Java
- Stars
- 800
- Forks
- 423
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 170
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/wicket
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Fix dark-mode table headers and phone-width overflow in the reference guide's CSSPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/wicket#1891 · 1 comment ·
Maintainers usually reply within 1 day
-
Document and enforce pull request review guidelinesPossibly taken @dashorst claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
COOP and COEP exemptions compare with the context path, so page exemptions never matchPossibly taken @asvanberg claimed this 25 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
apache/wicket#1661 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
RIS export splits an organization name containing “and” into multiple authorsPossibly taken @Gautam-aman claimed this today. Openstatus: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JabRef/jabref#17821 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day