wicket icon indicating copy to clipboard operation
wicket copied to clipboard

Fix dark-mode table headers and phone-width overflow in the reference guide's CSS

Open dashorst opened this issue 3 weeks ago • 2 comments

Two problems in the restyled reference guide (#1845), both in css/wicket.css, found while checking the accessibility chapter (#1847) in the new design.

Table header rows are unreadable in dark mode

asciidoctor.css gives table thead, table tfoot and tbody tr th the background #f7f8f7. In dark mode the header cells get the light text colour of the dark theme but keep this background, so the header row is light grey text, rgb(164, 184, 176), on an almost white background: a contrast of about 2:1, where WCAG 2.2 success criterion 1.4.3 asks for 4.5:1.

On master it shows on the one table with a header row, in "Working with AJAX" (chapter 19); #1847 adds a second one, the WCAG criteria table in "Accessibility". A dark-mode rule for table thead, table tfoot and tbody tr th that uses the page's own surface colour would fix both.

The page scrolls sideways at phone width

Below 768px, #toc.toc2 gets margin: 0 -36px (wicket.css, the max-width: 767px block). The table of contents then reaches from -18px to 393px on a 375px wide viewport, and the whole page scrolls 18px sideways (success criterion 1.4.10 asks for no scrolling in two directions at 320 CSS pixels). A negative margin that matches the padding of its container would keep the full-bleed look without the overflow.

Both were seen in target/generated-docs/single.html built with mvn -pl wicket-user-guide -Pguide generate-resources on master at 745ae018ec, in a 375 × 667 viewport and with prefers-color-scheme: dark.

dashorst avatar Nov 12 '26 23:11 dashorst

I have submitted a fix in [PR #1903](https://github.com/apache/wicket/pull/1903).

The changes address both reported issues:

  • Updated table header and footer backgrounds in dark mode to use the existing --paper theme variable.
  • Adjusted the mobile TOC's negative margin from -36px to -18px to prevent horizontal overflow on narrow screens.

Testing: Successfully ran mvn -pl wicket-user-guide -Pguide generate-resources and git diff --check.

Thank you for reporting this issue!

yashdotdev13 avatar Nov 14 '26 08:11 yashdotdev13

Fixed by #1903 (68ea5e9 on master), backported to wicket-11.x (5a4a6ddbb4) and wicket-10.x (8afaa3099e).

dashorst avatar Nov 25 '26 20:11 dashorst