Repository navigation
Conversation
ab1d424 to
e10249e
Compare
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)
e10249e to
5b7c15d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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:
|
|
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. |
papegaaij
left a comment
There was a problem hiding this comment.
#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)
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 getlang="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
accessibility/accessibility_2.adoc(the criteria table) andaccessibility_4,_5,_7(the code-heavy sections).lang="en"additions in the other chapters, and the chapter number inversioningCaching_2.adoc.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 withmvn -pl wicket-user-guide -Pguide package, and the new chapter has no broken anchors.AjaxLinkon<a href="#">for actions. That is guidance, not a WCAG failure.Closes #1839
Generated-by: Claude Code (Claude Opus 5.5)