Skip to content

Add an accessibility chapter to the user guide - #1847

Open
dashorst wants to merge 2 commits into
masterfrom
user-guide-accessibility-1839
Open

dashorst wants to merge 2 commits into
masterfrom
user-guide-accessibility-1839

Conversation

@dashorst

@dashorst dashorst commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Adds chapter 25, Accessibility, to the user guide. It sits after the testing chapters and before the best practices, so forms (11–12), repeaters (13), i18n (15), AJAX (19) and WicketTester (23) have all been introduced by then.

The chapter targets WCAG 2.2 level A and AA. It has a table of all 55 success criteria, each with the Wicket mechanism, the application's part and a link to the code. The other sections cover an accessible base page (lang from the session locale, a title per page, a skip link, landmarks, error pages), form errors (wicket:for, aria-invalid/aria-describedby), focus and announcements after AJAX updates, keyboard-operable AJAX controls, and data tables (caption, row headers, aria-sort, stable sort-link ids). A final section covers validating an application: WicketTester/TagTester assertions, axe-core with Playwright, HTML validation and the manual checks. Where Wicket has no support yet, the chapter shows a workaround with the current API. Those gaps are input for #1838.

The full-page <html> examples elsewhere in the guide get lang="en". The layout chapter's base page gets a title label, lang, a skip link and landmark elements. The internals chapter reference moves from 26 to 27.

Review notes

  • Core: accessibility/accessibility_2.adoc (the criteria table) and accessibility_4, _5, _7 (the code-heavy sections).
  • Mechanical: the lang="en" additions in the other chapters, and the chapter number in versioningCaching_2.adoc.
  • Verification: the Java and HTML examples were compiled and run in a scratch project against master's 11.0.0-SNAPSHOT. Four WicketTester tests pass, and the rendering checks for dialog roles, aria-sort, <th scope="row"> and the paging links pass. The axe-core/Playwright example compiles but has not been run against a live application. The guide builds with mvn -pl wicket-user-guide -Pguide package, and the new chapter has no broken anchors.
  • Open: the keyboard section discourages AjaxLink on <a href="#"> for actions. That is guidance, not a WCAG failure.

Closes #1839

Generated-by: Claude Code (Claude Opus 5.5)

@dashorst
dashorst force-pushed the user-guide-accessibility-1839 branch from ab1d424 to e10249e Compare November 7, 2026 23:29
The user guide did not tell developers how to build an accessible Wicket
application, and its own examples fell short: no <html> in the guide
carried a lang attribute, so a page built from "Wicket says Hello world!"
or "Wicket as page layout manager" failed WCAG 3.1.1 from the first line.

The new chapter 25, Accessibility, sits after the testing chapters and
before the best practices, where forms, repeaters, i18n, AJAX and
WicketTester have all been introduced. It covers:

- what Wicket takes care of and what stays with the application;
- a table of all 55 WCAG 2.2 success criteria of level A and AA, with the
  Wicket mechanism, the application's part and a link to the code;
- an accessible base page: a title per page, lang from the session
  locale, a skip link, landmarks and replacement error pages;
- form errors: wicket:for and wicket:label, a message next to the field,
  and a behavior that adds aria-invalid and aria-describedby;
- focus and announcements after AJAX updates: focusComponent, live
  regions that stay in the page, busy indicators and ModalDialog roles;
- keyboard-operable AJAX controls on <button> and <a>, not on <div>;
- data tables: caption, row headers, aria-sort and a stable markup id
  for sort links so that focus survives an AJAX sort;
- validating an application: WicketTester/TagTester assertions, axe-core
  with Playwright, HTML validation and the manual checks.

Where Wicket has no support today the chapter shows the workaround with
the current API; the gaps are input for the component audit in GitHub
issue #1838.

The full-page examples elsewhere in the guide get lang="en", and the
layout chapter's base page gets a title label, lang, a skip link and
landmark elements, so the new chapter can refer to it. The reference to
the internals chapter moves from 26 to 27.

GitHub issue #1839

Generated-by: Claude Code (Claude Opus 5.5)
@dashorst
dashorst force-pushed the user-guide-accessibility-1839 branch from e10249e to 5b7c15d Compare November 8, 2026 22:19
@codecov-commenter

codecov-commenter commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.74%. Comparing base (7d4b720) to head (0ed0609).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1847      +/-   ##
============================================
+ Coverage     62.72%   62.74%   +0.01%     
- Complexity    11512    11516       +4     
============================================
  Files          1254     1254              
  Lines         48665    48665              
  Branches       6845     6845              
============================================
+ Hits          30526    30535       +9     
+ Misses        15463    15455       -8     
+ Partials       2676     2675       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renoth

renoth commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Good changes, we had an accessibility audit 3 years ago, after which i made some PRs that got merged, since we use a custom Form-Framework in Wicket we had our stuff fixed for us, good to see this being done for the base components.
If you need help with ModalDialog you can contact me since we have an accessible Version of this in our framework

@papegaaij papegaaij left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1870 makes Wicket render lang and dir on every page, including the error pages. Once it's merged, the passages saying Wicket doesn't render lang (accessibility_1:45, accessibility_2:268, accessibility_3:78 and :122, and the layout chapter) and the TransparentWebMarkupContainer in the base page should describe the built-in behaviour instead. I'd merge #1870 first.

The item model of a ListView is a ListItemModel, which reads
list.get(index) on every getObject(). The example removed the address
and then read the model again for the status message, so it announced
the next address, and deleting the last one threw an
IndexOutOfBoundsException. The example now reads the address once,
before removing it.

GitHub issue #1839

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an accessibility chapter to the user guide

4 participants