Accessibility/TableHeaders: Difference between revisions

m
Line 211: Line 211:
=====Example 5=====
=====Example 5=====


Tables of this example expose row and column headers both and based on Example 3. The common cell that's visually shared between column and row headers can be treated in different ways, either like row header cell or column header cell.
Tables of this example expose row and column headers both and based on Example 3. The common cell at (row=0, column=0) position that is visually shared between column and row headers can be treated in different ways, either like row header cell or column header cell.
 
"Fruits" is column header cell in a table below. The author can use ARIA role="columnheader" or use scope="column" attribute on HTML th element to specify this.


{| cellpadding="1" border="1" width="100%"
{| cellpadding="1" border="1" width="100%"
Line 228: Line 230:
|}
|}


Here "Fruits" is column header cell. But it's not a row header cell. The author can user ARIA role="columnheader" or use scope="column" attribute on HTML th element to specify this.
"Persons" is row header cell in a table below. The author can user ARIA role="rowheader" or use scope="row" attribute attribute on HTML th element to specify this.


{| cellpadding="1" border="1" width="100%"
{| cellpadding="1" border="1" width="100%"
Line 245: Line 247:
|}
|}


Here "Persons" is row header cell. It's not a column header cell. The author can user ARIA role="rowheader" or use scope="row" attribute attribute on HTML th element to specify this.
"Fruits per persons" of the table below might be treated as row header cell and column header cell the same time. Neither ARIA role nor @scrope attribute provides useful information in this case.


The question is if author didn't specified the type of this header cell then how should we treat it?
{| cellpadding="1" border="1" width="100%"
|-
| style="font-weight: bold" | Fruits per persons
| style="font-weight: bold" | John
| style="font-weight: bold" | Ivan
|-
| style="font-weight: bold" | Apples
| 10
| 12
|-
| style="font-weight: bold" | Oranges
| 1
| 9
|}


=====Example 6=====
=====Example 6=====
Confirmed users
1,396

edits