Repository navigation
Conversation
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.84% 62.86% +0.02%
- Complexity 11570 11572 +2
============================================
Files 1255 1255
Lines 48759 48759
Branches 6877 6877
============================================
+ Hits 30641 30652 +11
+ Misses 15427 15415 -12
- Partials 2691 2692 +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 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)
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)
In the guide's new design three HTML listings in the accessibility chapter were wider than the content column and scrolled sideways at desktop width: the skip link of the base page, the delete button of the address list and the paging link with hidden text. Their long lines are now wrapped. The whitespace this adds sits between inline elements and does not change the accessible names. The manual checks in "Validating an application" now point at the HTML guide itself as a page to practise the keyboard and screen reader checks on, since it now has a skip link, main and navigation landmarks, aria-current in the table of contents and named copy buttons. GitHub issue #1839 Generated-by: Claude Code (Claude Opus 5.5)
0ed0609 to
12e5b72
Compare
Since #1870, WebPage renders lang and dir on its <html> tag from the page locale. The accessibility chapter still told readers that Wicket renders no lang attribute and had the base page bind <html> to a TransparentWebMarkupContainer with an AttributeModifier. That workaround now does harm: a bound <html wicket:id> is rendered by its component and gets no dir. The base page drops the container. The section on the language of the page describes what Wicket renders, that a lang in the markup takes precedence and suppresses dir, that Ajax does not re-render <html>, and onHtmlTag for further attributes. The criteria table, the gap list and the summary no longer count lang as missing, and the WicketTester example asserts dir as well. The default error pages now get the session's language on their English text. The chapter says so and refers to GitHub issue #1924. The layout chapter's examples hard-coded lang="en", which would now pin those pages to English; they leave lang to Wicket. 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)