Template talk:Year header

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconFilm Template‑class
WikiProject iconThis template is within the scope of WikiProject Film. If you would like to participate, please visit the project page, where you can join the discussion and see lists of open tasks and regional and topical task forces. To use this banner, please refer to the documentation. To improve this article, please refer to the guidelines.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Category[edit]

{{editprotect}} A category regarding table templates should be added here. --Anime Addict AA (talk) 16:25, 1 September 2009 (UTC)[reply]

I've added a /doc page so anyone can categorize this. — RockMFR 01:35, 2 September 2009 (UTC)[reply]

Change background for accessibility[edit]

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.

  • 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.
  • scope="row" 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.

Thus the new contents should be:

scope="row" colspan="7" style="text-align:left; background:#e9e9e9"<noinclude>
{{documentation}}
</noinclude>

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)[reply]

No objections, so I have added the request. --Mirokado (talk) 15:49, 20 May 2012 (UTC)[reply]
Done. Since you probably have some clue what this template is used for, please do document it. Anomie 18:25, 20 May 2012 (UTC)[reply]
Thanks. Updated the documentation. --Mirokado (talk) 20:56, 20 May 2012 (UTC)[reply]

Accessibility issues[edit]

Firstly, the year headers are incorrectly using scope="row" when they should use scope="colgroup" 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 scope= with id= on the headers and reference them on the data cells using headers= where the ids are separated by spaces in the order to be read like so:

{| class="wikitable"
|+ [caption text]
|-
! id=c1 | [column header 1]
! id=c2 | [column header 2]
! id=c3 | [column header 3]
|-
! id="1920" {{year header}} | [[1920 in film|1920]]
|-
! id="r1" headers="1920 c1" | [row header]
| headers="1920 r1 c2" | [normal cell]
| headers="1920 r1 c3" | [normal cell]
|-
! id="r2" headers="1920 c1" | [row header]
| headers="1920 r2 c2" | [normal cell]
| headers="1920 r2 c3" | [normal cell]
|-
! id="1921" {{year header}} | [[1921 in film|1921]]
|-
! id="r3" headers="1921 c1" | [row header]
| headers="1921 r3 c2" | [normal cell]
| headers="1921 r3 c3" | [normal cell]
|-
! id="r4" headers="1921 c1" | [row header]
| headers="1921 r4 c2" | [normal cell]
| headers="1921 r4 c3" | [normal cell]
|}

Jroberson108 (talk) 18:34, 3 January 2022 (UTC)[reply]