Wikipedia talk:Manual of Style/Accessibility/Data tables tutorial: Difference between revisions
Content deleted Content added
Timeshifter (talk | contribs) |
Timeshifter (talk | contribs) |
||
Line 376:
::Again, I emphasise that I'm completely ignorant about table formatting. I'm sure that tests the patience of regulars here, but I would like to get to the bottom of it if possible. [[MOS:CHARTS]] says "The chart positions should be organized into one table, and the table should be formatted using <code>class="wikitable sortable"</code>." Well, that was already in place before the recent changes at one or two album articles I watch; it seems to have been the introduction of these plainrowheaders that creates the darker grey background. [[User:JG66|JG66]] ([[User talk:JG66|talk]]) 03:25, 10 October 2021 (UTC)
:::{{u|JG66}}. No dig intended. I deleted my first answer. Here is my second answer. See:
:::'''[https://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H63.html H63: Using the scope attribute to associate header cells and data cells in data tables | Techniques for WCAG 2.0].''' It says:
:::"Note: For simple tables that have the headers in the first row or column then it is sufficient to simply use the TH elements without scope."
:::See: '''[https://www.w3.org/WAI/tutorials/tables Tables Concepts • Tables • WAI Web Accessibility Tutorials].''' It says:
:::"Tables with one header for rows or columns: For tables with content that is easy to distinguish, mark up header cells with <th> and data cells with <td> elements."
:::But when you go to the fine print it says "For tables with unclear header directions, define the direction of each header by setting the scope attribute to col or row."
:::I think most tables on Wikipedia do not have unclear header directions. The column headers are on the top. The row headers are on the left.
:::'''[https://www.w3.org/TR/WCAG20-TECHS/H51.html H51: Using table markup to present tabular information | Techniques for WCAG 2.0].''' "Simple tables generally have only one level of headers for columns and/or one level of headers on the rows." Example 1 is definitive as far as I am concerned. There is no requirement for scopes on such simple tables.
:::I did some tests awhile back that confirmed this:
:::[[Wikipedia talk:Manual of Style/Accessibility/Data tables tutorial#Comparing tables with and without scope=col and scope=row]]. Please ignore the heated tone of some of the discussion. I apologize for my part in the heated tone.
:::Getting to your questions. I don't see the need for designating row headers in the 2 column table examples you gave. Screen readers will read the column header for each data cell. It will be obvious to the user what the relationship is between the the 2 cells in each row, even without row headers. And scopes are total overkill in that example.
:::--[[User:Timeshifter|'''Timeshifter''']] ([[User talk:Timeshifter|talk]])
▲:::--[[User:Timeshifter|'''Timeshifter''']] ([[User talk:Timeshifter|talk]]) 05:20, 10 October 2021 (UTC)
|