Repository navigation
Conversation
Since GitHub issue #1848 (pull request #1870) every WebPage renders lang and dir on its <html> tag from the page locale. PageExpiredErrorPage, AccessDeniedPage, InternalErrorPage, ExceptionErrorPage and BrowserInfoPage are WebPages with fixed English text and no resource bundles, so a session in nl-NL got <html lang="nl-NL" dir="ltr"> on "Page Expired", and a session in Arabic or Hebrew got dir="rtl" too, which mirrored the English page. Screen readers read the English text with the pronunciation of the session language, which fails WCAG 2.2 success criterion 3.1.1 (Language of Page). The five pages now have lang="en" on <html> in their markup. A lang in the markup makes WebPage#onHtmlTag leave the tag alone, so they render lang="en" and no dir in every locale. Their HTML 4.01 Transitional doctype, which put browsers in limited-quirks mode, is replaced with <!DOCTYPE html>. Limited-quirks mode differs from standards mode only in the line height of images in table cells, and these pages have none, so they look the same. An application that shows these pages, or subclasses of them that render their markup, now gets lang="en", no dir and the HTML5 doctype, where a Wicket 12 snapshot rendered the session language and Wicket 11 no lang at all. Subclasses with markup of their own are not affected. Tests that compare a rendered default page with an expected file need the new doctype and <html> line. To show the pages in the language of the user, an application still replaces them with pages of its own. The sign-in and sign-out pages of wicket-auth-roles and the devutils pages have English text as well and are left alone. The auth-roles pages have markup variants for several languages, and the sign-in page holds a panel translated into other languages than the page, so lang="en" on its default markup would mark Dutch labels as English. The devutils pages are developer tools, not pages users see. GitHub issue #1924
# Conflicts: # migration-to-12.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1999 +/- ##
============================================
+ Coverage 63.00% 63.07% +0.06%
- Complexity 11665 11676 +11
============================================
Files 1255 1255
Lines 48865 48865
Branches 6910 6910
============================================
+ Hits 30788 30820 +32
+ Misses 15396 15364 -32
Partials 2681 2681 🚀 New features to boost your workflow:
|
papegaaij
approved these changes
Nov 24, 2026
papegaaij
left a comment
Contributor
There was a problem hiding this comment.
Looks fine to me. I'd say we can drop the changes to the migration guide. The instructions in AGENTS.md were far too broad, causing agents to see every change as worth recording in the migration guide, but this needs no migration at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1924
Since #1848 (#1870) every
WebPagerenderslanganddiron its<html>tag from the page locale.PageExpiredErrorPage,AccessDeniedPage,InternalErrorPage,ExceptionErrorPageandBrowserInfoPageareWebPages with fixed English text and no resource bundles, so a session innl-NLgot<html lang="nl-NL" dir="ltr">on "Page Expired", and a session in Arabic or Hebrew gotdir="rtl"too, which mirrored the English page. Screen readers read the English text with the pronunciation of the session language, which fails WCAG 2.2 SC 3.1.1 (Language of Page).What it does now
lang="en"on<html>in their markup. Alangin the markup makesWebPage#onHtmlTagleave the tag alone, so they renderlang="en"and nodirin every locale.<!DOCTYPE html>. The old doctype put browsers in limited-quirks mode, which differs from standards mode only in the line height of images in table cells; these pages and thePageViewpanelExceptionErrorPageembeds have none, so they look the same.migration-to-12.mdmentions it in the section onlanganddir.What applications see
An application that shows these pages, or subclasses of them that render their markup, gets
lang="en", nodirand the HTML5 doctype, where a 12 snapshot rendered the session language and Wicket 11 nolangat all. Subclasses with markup of their own are not affected. Tests that compare a rendered default page with an expected file need the new doctype and<html>line. To show these pages in the user's language, an application still replaces them with pages of its own.Not in this PR
lang="en"on its default markup would mark Dutch labels as English.lang="en"inDevUtilsPage.htmlwould cover all of them, if wanted.accessibility_1.adoc("HTML 4.01 doctype and English text that Wicket marks with the language of the session") andaccessibility_2.adoc("The default error pages get the language of the session on English text").Backport
None: #1870 is only on
master.Tests
EnglishPagesLangTestrenders each of the five pages innl-NL,ar-EGandhe-ILand assertslang="en"and nodir, and asserts<!DOCTYPE html>right before<html. All 20 cases fail without the markup change.mvn clean verify -Pjs-testis green.