Wikipedia talk:Manual of Style/Accessibility/Archive 17

Archive 10 Archive 15 Archive 16 Archive 17

Requesting input

Does the following chart pass WCAG? Qwerty284651 (talk) 15:04, 29 May 2024 (UTC)

Wikipedia talk:WikiProject Tennis#Performance timeline

Tournament 2019 2020 2021 2022 2023 2024 W–L Win %
Grand Slam events Australian Open 2R 4R 4R SF 4R 3R 17–6 74%
French Open 4R W QF W W 28–2 93%
Wimbledon 1R NH 4R 3R QF 9–4 69%
US Open 2R 3R 4R W 4R 16–4 80%
Win–loss 5–4 12–2 13–4 21–2 17–3 2–1 70–16 81%
YEC WTA Finals DNQ NH RR SF W 9–3 75%
Team events Summer Olympics NH 2R NH 1–1 50%
Billie Jean King Cup A A Q A 2–0 100%
WTA 1000 events Dubai Championships A N1K 3R N1K F 4–2 67%
Qatar Open N1K 2R N1K W N1K 6–1 86%
Indian Wells Open Q2 NH 4R W SF 12–2 86%
Miami Open Q2 NH 3R W A 7–1 88%
Madrid Open A NH 3R A F 7–2 78%
Italian Open A 1R W W QF 14–2 88%
Canadian Open 3R NH A 3R SF 6–3 67%
Cincinnati Open 2R 1R 2R 3R SF 5–5 50%
China Open A NH W 6–0 100%
Wuhan Open A NH 0–0  – 
Win–loss 3–2 1–3 12–5 24–2 27–6 0–0 67–18 79%
Career statistics 2019 2020 2021 2022 2023 2024 W–L Win %
Tournaments 11 6 16 17 18 2 Career: 70
Titles 0 1 2 8 6 0 Career: 17
Finals 1 1 2 9 8 0 Career: 21
Hard win–loss 7–7 7–4 20–11 47–7 42–8 7–1 130–38 77%
Clay win–loss 7–3 7–1 12–2 18–1 19–2 0–0 63–9 88%
Grass win–loss 0–2 4–2 2–1 7–1 0–0 13–6 68%
Overall win–loss 14–12 14–5 36–15 67–9 68–11 7–1 206–53 80%
Win (%) 54% 74% 71% 88% 86% 88% Career: 80%
Year-end ranking 61 17 9 1 1 $24,592,763

-- Qwerty284651 (talk) 15:04, 29 May 2024 (UTC)

Qwerty284651. You might have a look at the tools here:
c:Commons:Map resources#Accessibility and map colors
Take a screenshot of the table in question and upload it to the color blindness checkers.
Also, copy the color numbers of a background and text, and run them through the contrast checkers.
The hex code for black text is #000000. See also:
Wikipedia:Manual of Style/Accessibility/Colors
Wikipedia:Colour contrast
Help:Link color
--Timeshifter (talk) 04:25, 7 June 2024 (UTC)

Is Template:static row numbers accessible?

Do screen readers detect static row numbers as a row header or do they jump straight into the data cell in column 2? I am asking whether it is accessible. Does it require an "id=...". Otherwise, I can just use regular data cells. Qwerty284651 (talk) 16:34, 5 June 2024 (UTC)

They jump straight into the data cell in column 2. (but they do read the static row numbers when not in table navigation mode). I have no idea how you'd make them properly accessible. Graham87 (talk) 17:25, 5 June 2024 (UTC)
It looks to me like the first column is not a real table column but extra CSS-generated content that is inserted before the first real column and styled to appear like a table cell. The CSS is in Template:Static row numbers/styles.css, and this contains several CSS rules, of which five actually produce the row numbers (the others are concerned purely with visual appearance: alignment, backgrounds, borders, colour, font and padding). These five are:
.static-row-numbers {
  counter-reset: rowNumber;
}
.static-row-numbers tr::before {
  content: "";
  display: table-cell;
}
.static-row-numbers thead + tbody tr:first-child:not(.static-row-header):not(.static-row-numbers-norank)::before,
.static-row-numbers tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
  counter-increment: rowNumber;
  content: counter(rowNumber);
}
.static-row-header-text.static-row-numbers thead tr:first-child::before,
.static-row-header-text.static-row-numbers caption + tbody tr:first-child::before,
.static-row-header-text.static-row-numbers tbody:first-child tr:first-child::before {
  content: "No.";
}
.static-row-header-hash.static-row-numbers thead tr:first-child::before,
.static-row-header-hash.static-row-numbers caption + tbody tr:first-child::before,
.static-row-header-hash.static-row-numbers tbody:first-child tr:first-child::before {
  content: "#";
}
W3C documentation for these properties is as follows: counter-reset, content, display, counter-increment and also the ::before pseudo-element. --Redrose64 🌹 (talk) 19:54, 5 June 2024 (UTC)
Pinging @Jts1882, Timeshifter, Guarapiranga, and Jroberson108:, the editors involved in its development, to look more into it and make it more accessible. Qwerty284651 (talk) 20:18, 5 June 2024 (UTC)
The only thing I can think to change that might make it more accessible is adding content before the first td/th in the row (tr :first-child::before) instead of before the row (tr::before). This way it's in the row instead of before it. Jroberson108 (talk) 21:18, 5 June 2024 (UTC)
I misspoke. The current styles place the content inside the table rows. Doing what I suggested would prepend the content inside the first td of each row. Jroberson108 (talk) 00:52, 6 June 2024 (UTC)

Graham87 and others with screen readers. The following table has the hash symbol (#) as the row number column header. How does your screen reader see it? This example is adapted from Template:Static row numbers#Display hash ("#") symbol in column label.

Example table with hash as row number column header
Color Data
A B C
Red 1 2 3
Lime 4 5 6
Gold 7 8 9

Wikitext:

{{static row numbers}}
{| class="wikitable static-row-numbers static-row-header-hash"
|+ Example table with hash as row number column header
|-
! rowspan=2 | Color
! colspan=3 | Data
|- class=static-row-header
! A !! B !! C
|-
...

--Timeshifter (talk) 04:26, 7 June 2024 (UTC)

@Timeshifter: It doesn't see the row numbers as part of the table ... because they still aren't, technically, as you can see from the table's HTML source. As I implied above there is probably no way to fix this. Graham87 (talk) 07:46, 7 June 2024 (UTC)
I tried with ChatGPT and after they tried JavaScript and PHP they finally gave up when I asked for a pure html and CSS solution. Gonnym (talk) 08:02, 7 June 2024 (UTC)
It seem like the CSS counter is not critical content since the template is optional and the tables are understandable without it. Basically a nice to have. Would that mean it is decorative content that can be ignored regarding accessibility? Jroberson108 (talk) 12:49, 7 June 2024 (UTC)
Graham87. So I guess we can ignore adding the hash as a column header, as far as you are concerned? In other words, there is no benefit to you? Very few people add any type of column header to the static row numbers. Sighted readers don't need it at all.
But if the hash is of any benefit to you, in some mode or other of the screen reader, then it is easy to make it be placed as the column header by default. No choice to remove it. That would be my preference if it is of benefit to screen-reader users in any way. --Timeshifter (talk) 02:46, 8 June 2024 (UTC)
@Timeshifter: Nope, it does nothing for screen reader users. Graham87 (talk) 05:24, 8 June 2024 (UTC)