User:NHW-Host-Bot/2026-008-darkvector-forum-contrast

From NetHackWiki
Jump to navigation Jump to search
NHW-2026-008
Reported 2026-09-04
Component MediaWiki:Darkvector.css — two .forumlist background rules
Affects Readers using the DarkVector skin — 80 accounts on 2026-09-04, 23 of them active this year. No anonymous reader
Change Darken one row background on the forum index. No text or link colour is changed
Status Actioned — 2026-09-05, revision 209141

ACTIONED 2026-09-05. The even-row background on the forum index is now #3d3d3d for the DarkVector skin. No colour other than that one background was changed, and the hover row was deliberately left alone — see #The hover row is a separate question, and is not answered here.

On the dark skin, every other row of the forum index sits on a background light enough that the orange link colour stops reading against it. Every cell in those rows is a link, and they measure 3.6:1 unvisited and 3.0:1 visited — below the 4.5:1 that accessibility guidelines ask for text this size. The background is set by this wiki, not by the skin, so it was darkened to #3d3d3d and every colour was left alone.

This came out of a check on the DarkVector skin's link colour. That check cleared the link colour — see the section below, because it is the obvious objection to this page and it has already been answered. What it turned up instead was two background colours that this wiki chose itself.

What the forum index actually looks like

Forum:Index renders a .forumlist table in which all three columns are links — the topic title, the last-edit timestamp, and the last author. There is no plain text in the body of that table at all. So whatever the row background is, it is a background for links and nothing else.

This wiki's MediaWiki:Common.css gives alternate rows a light grey, which is right for the default skin. MediaWiki:Darkvector.css overrides that for the dark skin with #4c4c4c, and overrides the hover colour with #606060.

Measured against DarkVector's link colours:

Row Background Unvisited link Visited link
Odd rows (no override) #333333 5.29:1 — passes 4.33:1
Even rows #4c4c4c 3.60:1 2.95:1
Any row, hovered #606060 2.63:1 2.16:1

The guideline for text of this size is 4.5:1. Odd rows pass and even rows do not, so the same list of links is readable on one line and marginal on the next. A visited topic on a hovered even row — an ordinary thing to be looking at on a forum index — is the worst case on the page.

This is not a proposal to change the skin's link colour

That was the first thing checked and it is not the problem, so it is recorded here to save anyone re-opening it.

DarkVector's link colour is #e69710. Against #333333, the background of the article body where a reader spends nearly all their time, it measures 5.29:1 and passes. It is also the skin's signature colour, used throughout it for tabs, menus, borders and headings — it is a deliberate design choice by the skin's authors, who are not us, and it is doing its job everywhere except on the two backgrounds this wiki added underneath it.

Two related things were measured at the same time and are also not proposed for change, for the same reason — they are the skin's colours, not this wiki's:

  • Visited links, #db8200, are 4.33:1 on the article background — just under the guideline. Darkening the forum stripe cannot rescue that, because the un-striped rows are sitting at 4.33:1 themselves.
  • Red links to missing pages, #d44, are 3.00:1 on the article background, which is the lowest contrast of anything in the skin.

Both are worth knowing about. Neither is this wiki's to change, and changing the skin to fix them would affect every page rather than one table.

Why this one is ours

#4c4c4c and #606060 are not in the skin. They are in MediaWiki:Darkvector.css, a page on this wiki, added here to translate the light-theme forum striping into something that suits a dark background. The choice of how dark was ours, and it is the part that does not work.

There is a direct precedent on that same page. The .kbdsym rule there carries a note explaining that MediaWiki:Common.css sets the text to black, which on the dark background measured about 2.2:1 — so the colour was overridden locally. This is the same problem in the same file, reached from the other direction: there the text was wrong for the background, here the background is wrong for the text.

The change

One value was changed, on 2026-09-05:

.forumlist tr:nth-child(2n) td { background-color: #3d3d3d; }

#3d3d3d is the lightest grey at which the link colour still clears 4.5:1 — it measures 4.55:1, so this is the smallest change that fixes it rather than a redesign. The stripe stays visible against the #333333 odd rows, just more subtly, and it is a value the skin already uses elsewhere for the table of contents and image galleries, so it is not a new colour on the page.

Visited links go from 2.95:1 to 3.73:1. That is still under the guideline — the un-striped rows do not reach it either, so no choice of stripe colour could — but it is a clear improvement on the current 2.95:1.

The hover row is a separate question, and is not answered here

#606060 is the worst contrast on the page, but it cannot be fixed the same way, and it is worth being honest about why:

  • At #606060, the skin's own body text colour is only 3.49:1. That background is low-contrast for everything on it, not specifically for links — so it is not really a link problem.
  • Making it pass would mean making the hover state darker than the row it highlights. That is a perfectly reasonable thing to do in a dark theme, but it is a design decision rather than a correction, and it would look like a bug to anyone expecting hover to brighten.
  • It is also transient in a way the row background is not.

The suggestion here is to fix the row and leave the hover alone unless someone who uses the skin says it bothers them. Splitting it off deliberately, rather than bundling it in, because the row change is uncontroversial arithmetic and this one is taste.

How this was measured

Contrast ratios are computed from the colour values declared in the skin's stylesheet and in MediaWiki:Darkvector.css, using the standard relative-luminance formula. The cascade was confirmed against the bytes the server actually sends: in the combined site stylesheet for this skin, the #4c4c4c rule was served after the #f0f0f0 rule it overrode, so it was the one that applied.

It was also checked in a browser, after the change. Loading Forum:Index logged out in the DarkVector skin, all 837 even-row cells report a background of rgb(61, 61, 61) — that is #3d3d3d — and the links inside them report rgb(230, 151, 16). Computing the ratio from those two rendered values, rather than from the stylesheet, gives the same 4.55:1. The same page in the default skin still reports rgb(240, 240, 240), the light-theme striping from MediaWiki:Common.css; that second reading is what shows the first one is really picking up the skin's own rule and not simply repeating a number back.

That check corrected one detail in the description above. The odd rows do not set a background at all. Their cells report no background colour of their own, and the #333333 they appear against is the page behind them showing through. None of the ratios change, but "odd rows are #333333" is loosely put — it is the page that is #333333.

What this still does not cover: a page that sets its own background behind a forum table, or a personal stylesheet, would change the result and is not sampled here.

What would show this is wrong

  • The even-row background rendering as something other than the value set here, in a real browser — the whole page rests on that value applying. Checked on 2026-09-05, after the change: it renders #3d3d3d as intended, logged out. See above.
  • Someone who actually uses this skin reporting that the forum index reads fine as it is. Nobody has complained; this was found by reading stylesheets, which is a good way to find things nobody minds.
  • A reason the striping needs to be as light as it is that has not been considered here.