Template talk:Year header

Category
A category regarding table templates should be added here. --Anime Addict AA (talk) 16:25, 1 September 2009 (UTC)
 * I've added a /doc page so anyone can categorize this. — RockMFR 01:35, 2 September 2009 (UTC)

Change background for accessibility
Please can we make some changes for WP:ACCESSIBILITY and WP:DTT. I'll add an edit request template if necessary, depending on any responses here. Thus the new contents should be: scope="row" colspan="7" style="text-align:left; background:#e9e9e9"
 * make the background lighter so that the contrast between background and the year link #0645ad meets accessibility guidelines. Checking with the Firefox addon from Juicy Studio (yes I know, stupid name) I find that the darkest background meeting the WCAG 2.0 AAA luminosity contrast ratio is #e9e9e9 "7.02:1 (pass at level AAA)". See this sandbox page for shades close to that in a typical context. This shade is still a bit darker than the default header background which gives the table the intended overall appearance.
 * so that user agents such as screen readers recognise this as a row header and can correctly interpret the scope of the (any) column headers.

For these changes implemented as above but obviously not using the template, see List of horror films of the 1920s. Thanks. --Mirokado (talk) 23:38, 18 May 2012 (UTC)
 * No objections, so I have added the request. --Mirokado (talk) 15:49, 20 May 2012 (UTC)
 * Yes check.svg Done. Since you probably have some clue what this template is used for, please do document it. Anomie⚔ 18:25, 20 May 2012 (UTC)
 * Thanks. Updated the documentation. --Mirokado (talk) 20:56, 20 May 2012 (UTC)

Accessibility issues
Firstly, the year headers are incorrectly using  when they should use   since they are column header for a group of columns (no data to the right of the headers).

Secondly, the year headers introduce an element of uncertainty to screen readers on whether or not the 1920 header also applies to the cells under the 1921 header. Some solutions are to separate it into yearly tables or remove the yearly headers and add a "Year" column which helps make it sortable. If this cannot be done, then complex tables with uncertain headers should replace  with   on the headers and reference them on the data cells using   where the ids are separated by spaces in the order to be read like so: Jroberson108 (talk) 18:34, 3 January 2022 (UTC)