TDG EMPIRE
☰
Features
Wiki
Gallery
Webmap
Interactive Map
Punishments
Discord
Wiki
TDG Encyclopedia
Not logged in
Talk
Contributions
Create account
Log in
Search
Template
Discussion
Read
Edit source
Add topic
View history
Editing
Template talk:Navbox
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== WCAG AA 2.0 / MOS:CONTRAST == I am aware this has been discussed before, but I don't see any proposed firm solutions to it. The css styles applied to navboxes don't meet MOS:CONTRAST: 1) .navbox-title uses a background colour of {{Legend inline|#CCF}} (#CCF) and 2) .navbox-abovebelow, .navbox-group, .navbox-subgroup, and .navbox-title use a background colour of {{Legend inline|#DDF}} (#DDF). These do not sufficiently contrast against the Wikipedia link colour of {{Legend inline|#36C}} (#36C) at only 3.48:1 and 4.05:1 respectively, whereas both WCAG and Wikipedia set a minimum contrast of 4.5:1 for normal point font. Correcting this is simple, requiring only a lighter shade of {{Legend inline|#EAEAFF}} (#EAEAFF) for 4.52:1 and then from there you can use any of {{Legend inline|#EEF}} (#EEF) to {{Legend inline|#FCFCFF}} (#FCFCFF). This assumes insistence on retaining the present hue. Two other options are to shift to a cyan colour such as {{Legend inline|#CFF}} (#CFF with the same saturation as #CCF) or a better contrasting colour such as yellow {{Legend inline|#FFC}} (#FFC) or green {{Legend inline|#CFC}} (#CFC). I imagine the principle of least astonishment may favour something on the line of {{Legend inline|#CCF2FF}} (#CCF2FF) and {{Legend inline|#DDF6FF}} (#DDF6FF) as a minimal hue change. I've put some examples down below: {{Navbox | name = Navbox | title = Example | above = Subexample }} {{Navbox | name = Navbox | title = Example | titlestyle = background-color:#EAEAFF; | above = Subexample | abovestyle = background-color:#F9F9FF }} {{Navbox | name = Navbox | title = Example | titlestyle = background-color:#CCF2FF; | above = Subexample | abovestyle = background-color:#DDF6FF }} {{Navbox | name = Navbox | title = Example | titlestyle = background-color:#FEC; | above = Subexample | abovestyle = background-color:#FFF3DD; }} The issue exists for the normal point 'show/hide' button and the V.T.E links. Personally, I'd rather revert Wikipedia's chosen Vector 2022 {{Legend inline|#36C}} links as it is wholly impossible to meet WCAG AAA 2.0 with that font colour as even on a white background the normal point font only contrast 5.36:1, whereas WCAG AAA standards set 7:1. I much prefer Vector 2010's {{Legend inline|#0645AD}} links for specifically this reason. I have Vector 2010 enabled in preferences, so for me there is no issue, but that's just not true for the overwhelming majority of Wikipedia readers. [[User:Mr rnddude|Mr rnddude]] ([[User talk:Mr rnddude|talk]]) 06:35, 29 August 2026 (UTC) :The relevant earlier consensus was {{section link|Template_talk:Navbox/Archive_19#RfC:_Should_the_default_colors_for_this_template_be_changed_to_satisfy_AAA_level_accessibility_color_contrasts_WP:COLOR?_If_so,_to_which_colors?}}. I had a separate discussion that was very related at {{section link|Template_talk:Navbox/Archive_24#Inaccessible_links_in_navbar}}. You also need to consider <code>a:visited</code>, not just <code>a</code>. Which limits the colors even more dramatically. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:47, 29 August 2026 (UTC) :In general, I think we should strive for best effort here. The other factor I think we should consider is that WCAG 2 is not really the best contrast standard. WCAG 3 ([https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/ in development]) uses an algorithm called Accessible Perceptual Contrast Algorithm to decide whether contrast is good. It takes into account additional factors like text boldness and size (and I think the actual contrast calculation differs but I do not remember). :I don't know if APCA helps or hurts but given that there is a lot of bold in these templates in the purple colored parts I suspect it will help. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:54, 29 August 2026 (UTC) ::a:visited appears to be {{Legend inline|#6A60B0}} (#6A60B0). The colour contrast scores for it are as follows: {{Legend inline|#EAEAFF}} (4.52:1 - pass); {{Legend inline|#CCF2FF}} (4.52:1 - pass); {{Legend inline|#FEC}} (4.69:1 - pass). It seems to be about a bad a colour as #36C overall with the same limit of 5:36:1 against {{Legend inline|#FFF}}. For clarity, I am not proposing AAA compliance here as it is not possible to achieve it with the Vector 2022 skin; it is possible to achieve AA compliance despite it. I'm really proposing we attain the bare minimum here. WCAG 2.0 also does take into consideration boldness (14pt/18px + bold) and font size (18pt/24px) with a reduced contrast requirement of 3:1. {{pb}} WCAG 3.0 is in development and will not be ready for ''years'' to come. Its 'contrast ratio test' is in the exploratory phase with {{tq|the contrast algorithm used in WCAG 3 is yet to be determined}}.[https://www.w3.org/TR/wcag-3.0/#dfn-contrast-ratio-test 1] APCA may be a candidate, but that sets a higher standard to achieve. #36C and #6A60B0 both require 14pt/700w on a {{Legend inline|#FFF}} (#FFF) background and even {{Legend inline|#000}} (#000) fails below 14px/500w or 15px/400w.[https://apcacontrast.com/ 1][https://www.achecks.org/apca-accessible-colour-contrast-checker/ 2] Though this is a distraction, as whether or not WCAG AA is the best standard isn't meaningful when we're below even it (here and elsewhere). {{pb}} This also doesn't address whether any of the proposed solutions are viable/desirable. The lighter colours in all cases seem to increase the immediate identifiability of the show/hide button and the V.T.E links. I don't expect anyone to favour the bright orange despite it scoring the highest (both on WCAG and APCA with an Lc of 67.1), because it doesn't fit with the general Wikipedia aesthetic, it is mostly of demonstrative value. We could at the very least simply brighten the existing colour. [[User:Mr rnddude|Mr rnddude]] ([[User talk:Mr rnddude|talk]]) 00:18, 30 August 2026 (UTC) ::Addendum, since I'm re-passing here: I neglected to mention that the current font size and weight of the V.T.E links and the show/hide button is 14px/400w. They do not benefit from the reduced contrast requirement for either WCAG or APCA. [[User:Mr rnddude|Mr rnddude]] ([[User talk:Mr rnddude|talk]]) 08:25, 30 August 2026 (UTC) :::Yes, "best-effort" was an acknowledgement that AAA is definitely silly even to attempt at this point and that AA was sillier than not. :::I agree that orange is the wrong direction. I am partial to grey personally, but changing the lightness would be a start. We'd have to hash out the intermediate colors also. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 19:41, 31 August 2026 (UTC) ::::The only intermediate colour that I was able to identify with a problem for both a and a:visited is that used for the various subheaders of {{Legend inline|#DDF}}. I shifted both {{Legend inline|#CCF}} and {{Legend inline|#DDF}} by the same amount to {{Legend inline|#EAEAFF}} and {{Legend inline|#F9F9FF}}. The colours of the list entries {{Legend inline|#FFF}} and {{Legend inline|#F7F7F7}} don't present any problems, though I suppose you could match the light grey list colour to the light blue-grey colour as in {{Legend inline|#F7F7FF}} and {{Legend inline|#F7F7F7}} or {{Legend inline|#F9F9FF}} and {{Legend inline|#F9F9F9}}. I suspect the distinction being drawn is too narrow for 99% of people to be able to tell without checking the source code. I checked these colours against APCA as well and in all cases we're looking at a score above Lc60 which is stated to be '[t]he '''''minimum''''' level recommended for content text that is not body, column, or block text [... as in] text you want people to read' (''emphasis in original'').[https://apcacontrast.com/ 1] In dark mode, everything appears to be fine under our current standard, though APCA presumably finds the link colours of {{Legend inline|#88A3EA}} and {{Legend inline|#A799CD}} to be an issue with the background colour of the documentation template of {{Legend inline|#0B1B1C}} β the navbox itself defaults to a transparent background. That isn't an issue to address here as it applies to all links on every template documentation page; it also has no bearing on the navbox as it appears in articles. [[User:Mr rnddude|Mr rnddude]] ([[User talk:Mr rnddude|talk]]) 23:51, 31 August 2026 (UTC) :::::We should sort out the light colors before worrying about the dark, IMO. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 23:56, 31 August 2026 (UTC) ::::::Then are there any other colours you need me to address? [[User:Mr rnddude|Mr rnddude]] ([[User talk:Mr rnddude|talk]]) 02:47, 3 September 2026 (UTC)
Summary:
Please note that all contributions to TDG Encyclopedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TDG Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)