Template talk:Adjacent stations

Adjacent stations module appears not to respect WCAG 2.0 AA for contrast

[edit]

Adding the {{overcolored}} template to this module.

It appears that this module is not correctly calculating the text color for text over a route icon. For instance, Module:Adjacent stations/Buenos Aires Underground produces the following:

Correct colorations:

White text on a colored background where white is accessible:

, , ,

Black text on a colored background where black is accessible:

Incorrect colorations:

White text on a colored background where black is accessible but white is not (followed by the same line in accessible text):

(A), (B), (G), (I), (P)

Conclusion:

If I examine the code for Module:Adjacent stations/Buenos Aires Underground, only the bubble color is shown. The text color is not. This implies to me that the text color is being calculated in {{Adjacent stations}} instead.

The algorithm needs to be changed to produce accessible color combinations between text and background.

Thisisnotatest (talk) 22:16, 19 October 2024 (UTC)[reply]

I see @Oknazevad: reverted my edit of adding the {{overcolored}} template to this module on the basis of "The colors are accurate representations of the real world colors."
It is fine for the colors to be accurate representation of real world colors when the colors are solely being used as logos (which are exempt from WCAG 2.0). The problem is when they are being used to convey information (such as transfers) or as the sole link to the related content; at that point they become an accessibility issue.
Additionally, these colors are being generated by an algorithm, not a data table. So it is not clear to me that these are representing the real-life colors. But even if they are, the accessibility issue remains when they are used as links or to convey information.
Thisisnotatest (talk) 03:22, 13 December 2024 (UTC)[reply]
In this specific example, these are all SVGs stored on Commons. Looking at [1], they appear to be accurate representations. Adjacent stations isn't doing anything special with an SVG, just passing it through. If the logos are used in a contextually inappropriate way, then that's not something that needs to be fixed in the main module, that's something that needs to be addressed on a case-by-case basis, unless I've misunderstood something. Mackensen (talk) 03:25, 13 December 2024 (UTC)[reply]

S43 — Martin (MSGJ · talk) 21:42, 16 December 2024 (UTC)[reply]

Now working again. @Swiss512 please review your edit to Module:Adjacent stations/Bern S-Bahn — Martin (MSGJ · talk) 21:53, 16 December 2024 (UTC)[reply]
@Swiss512: I don't know why you haven't replied, but I think it would be better to keep S43 in the code. Just because it has stopped running does not mean it should not be written about. This is an encyclopedia not a travel guide — Martin (MSGJ · talk) 00:09, 21 December 2024 (UTC)[reply]
Thanks for your suggestion. For next time, if a service gets disused I will keep the code in the module and put a note that it is not in use. Swiss512 (talk) 10:33, 21 December 2024 (UTC)[reply]

Line merged including right side which shouldn't be

[edit]

The following code should have the second line marked with the right being the terminus:

{{Adjacent stations
|system1=National Rail|line1=London North Eastern Railway|type1=Highland Chieftain|left=Aviemore or Carrbridge Sunday
|line2=ScotRail|type2=Highland Main Line|left2=Aviemore or Carrbridge
|line3=ScotRail|type3=Highland Main Line|left3=Aviemore or Carrbridge|right3=Inverness Airport|to-right3=Inverness Airport|note-right3=(Sundays only)
}}

Instead, the second line--including the right--is completely merged into the third. How can I keep the right side separate while having the rest of lines 2 and 3 merged? Animal lover |666| 12:28, 1 June 2025 (UTC)[reply]

You need to have something in |right2=. I hacked it like this, which is probably not what you want:
Preceding station National Rail National Rail Following station
Aviemore or
Carrbridge (Sunday southbound only)
London North Eastern Railway Terminus
Aviemore or Carrbridge
towards Perth
ScotRail
towards Inverness
Inverness Airport
(Sundays only)
Terminus
You should be able to improve upon that hack. – Jonesey95 (talk) 12:42, 1 June 2025 (UTC)[reply]

Data module not recognizing through service

[edit]

Obu Station's adjsta broke, when I was trying to list a service that continues to Nagoya Station beyond Obu, the usual terminus of the line. I wanted the adjstn to say "Kyowa towards Nagoya" instead, but I have no idea how to do that, and when I try the page warns me of errors so here I am. AlphaBetaGamma (Talk/report any mistakes here) 13:00, 19 June 2025 (UTC)[reply]