[whatwg] ARIA semantics of implied rows

2014-09-26 Thread Daniel Trebbien
Hi WHATWG,

ยง4.9.12 Processing model (
https://html.spec.whatwg.org/multipage/tables.html#processing-model-3 )
currently states:

A *row* is a complete set of slots from x=0 to x=x_width-1, for a
 particular value of y. Rows usually correspond to tr elements, though a row
 group can have some implied rows at the end in some cases involving cells
 spanning multiple rows.


I am thinking that implied rows refers to cases such as:

table id=theTable border=1
  tbody
tr
  td rowspan=10 colspan=3These are the first 10 rows./td
/tr
  /tbody
  tbody
tr
  tdRow 11, Column 1/td
  tdRow 11, Column 2/td
  tdRow 11, Column 3/td
/tr
tr
  tdRow 12, Column 1/td
  tdRow 12, Column 2/td
  tdRow 12, Column 3/td
/tr
tr
  tdRow 13, Column 1/td
  tdRow 13, Column 2/td
  tdRow 13, Column 3/td
/tr
tr
  tdRow 14, Column 1/td
  tdRow 14, Column 2/td
  tdRow 14, Column 3/td
/tr
tr
  tdRow 15, Column 1/td
  tdRow 15, Column 2/td
  tdRow 15, Column 3/td
/tr
  /tbody
/table

.. where because the first row group has a TD spanning 10 rows but only one
TR, there are 9 implied rows in that row group.

As specified by WAI-ARIA 1.0:

The HTML Working Group is incorporating WAI-ARIA into HTML 5. Official
 support for WAI-ARIA in HTML will be provided in that specification. This
 DTD is made available only as a bridging solution for applications
 requiring DTD validation but not using HTML 5.


http://www.w3.org/TR/wai-aria/appendices#html_dtd

One issue is that the ARIA semantics for implied rows are not defined.

Currently, browsers that I have tested (Chrome 37.0.2062.124, Firefox
32.0.3, Safari 7.1, and Internet Explorer 11) only expose 6 rows for the
example listed above.  In order to get all 15 rows exposed to assistive
technologies, I need to insert empty TR elements for the implied rows.

It would be very useful if implied rows were exposed implicitly, using the
same role as the row containing the anchor slot of the first cell in the
implied row.

Sincerely,

Daniel Trebbien


Re: [whatwg] ARIA semantics of implied rows

2014-09-26 Thread Anne van Kesteren
On Fri, Sep 26, 2014 at 7:59 PM, Daniel Trebbien dtrebb...@gmail.com wrote:
 http://www.w3.org/TR/wai-aria/appendices#html_dtd

DTDs have nothing to do with what you're seeing here. They're best ignored.


 One issue is that the ARIA semantics for implied rows are not defined.

I'm not sure I understand why ARIA would come into play at all when it
comes to tables. Weren't tables accessible (I realize it has always
been somewhat hard to convey them properly) long before ARIA existed?


-- 
https://annevankesteren.nl/


Re: [whatwg] ARIA semantics of implied rows

2014-09-26 Thread Daniel Trebbien
(sorry, forgot to copy the list)

On Fri, Sep 26, 2014 at 2:09 PM, Anne van Kesteren ann...@annevk.nl wrote:

 On Fri, Sep 26, 2014 at 7:59 PM, Daniel Trebbien dtrebb...@gmail.com
 wrote:

...


  One issue is that the ARIA semantics for implied rows are not defined.

 I'm not sure I understand why ARIA would come into play at all when it
 comes to tables. Weren't tables accessible (I realize it has always
 been somewhat hard to convey them properly) long before ARIA existed?


The issue is that, as far as I can tell, HTML 4.01 does not support
implied rows:
http://www.w3.org/TR/html401/struct/tables.html
This is new to HTML5.

WAI-ARIA does define roles for a table (grid, row, rowgroup, gridcell,
etc.), but you can't specify the role and state attributes for HTML5
implied rows.

I ran through the forming a table steps (
https://html.spec.whatwg.org/multipage/tables.html#forming-a-table ) on
paper for the example and I came up with x_width is 3 and y_height is 15.
If the table model has 3 columns and 15 rows (9 of which are implied), then
browsers should expose 3 columns and 15 rows.


Re: [whatwg] ARIA semantics of implied rows

2014-09-26 Thread Tab Atkins Jr.
On Fri, Sep 26, 2014 at 11:39 AM, Daniel Trebbien dtrebb...@gmail.com wrote:
 On Fri, Sep 26, 2014 at 2:09 PM, Anne van Kesteren ann...@annevk.nl wrote:
 On Fri, Sep 26, 2014 at 7:59 PM, Daniel Trebbien dtrebb...@gmail.com
 wrote:
  One issue is that the ARIA semantics for implied rows are not defined.

 I'm not sure I understand why ARIA would come into play at all when it
 comes to tables. Weren't tables accessible (I realize it has always
 been somewhat hard to convey them properly) long before ARIA existed?


 The issue is that, as far as I can tell, HTML 4.01 does not support
 implied rows:
 http://www.w3.org/TR/html401/struct/tables.html
 This is new to HTML5.

No, HTML4 supported this; it probably didn't actually have any
normative text around it, but browsers certainly supported having a
rowspan go past the end of the explicit rows.

~TJ


Re: [whatwg] ARIA semantics of implied rows

2014-09-26 Thread Daniel Trebbien
On Fri, Sep 26, 2014 at 3:01 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:

 On Fri, Sep 26, 2014 at 11:39 AM, Daniel Trebbien dtrebb...@gmail.com
 wrote:
  On Fri, Sep 26, 2014 at 2:09 PM, Anne van Kesteren ann...@annevk.nl
 wrote:
  On Fri, Sep 26, 2014 at 7:59 PM, Daniel Trebbien dtrebb...@gmail.com
  wrote:
   One issue is that the ARIA semantics for implied rows are not
 defined.
 
  I'm not sure I understand why ARIA would come into play at all when it
  comes to tables. Weren't tables accessible (I realize it has always
  been somewhat hard to convey them properly) long before ARIA existed?
 
 
  The issue is that, as far as I can tell, HTML 4.01 does not support
  implied rows:
  http://www.w3.org/TR/html401/struct/tables.html
  This is new to HTML5.

 No, HTML4 supported this; it probably didn't actually have any
 normative text around it, but browsers certainly supported having a
 rowspan go past the end of the explicit rows.



That's true.  Browsers supported this.  What I mean is that HTML4 didn't
have normative specification of this, but HTML5 does.

I guess what I wanted to clarify is that when a browser exposes a table to
the operating system's accessibility layer which screen readers use to
announce the content of a web page, the model of the table in the
accessibility layer should match the HTML5 table model.

Using the Accessibility Inspector tool on Mac and the Inspect tool on
Windows, I am seeing that browsers are currently not exposing the implied
rows.  Chrome, Firefox, Safari, and Internet Explorer are only exposing 6
rows for the example.

Using the example table HTML in Chrome for Mac, Chrome is not exposing to
Mac's accessibility hierarchy the 15 rows of the table, but only 6 rows;
there are only 6 AXRow children of the AXTable.  With Accessibility
Inspector I see that the AXCell corresponding to the first cell in the
first row has the AXColumnIndexRange attribute set to loc=0, len=3 and the
AXRowIndexRange attribute set to loc=0, len=10 (which are correct).
However, when I navigate to the Row 11, Column 1 cell, VoiceOver
announces row 2 of 6 Row 11, Column 1.

If I modify the example HTML to insert empty TR elements for each of the 9
implied rows:

table id=theTable border=1
  tbody
tr
  td rowspan=10 colspan=3These are the first 10 rows./td
/tr
tr/tr
tr/tr
tr/tr
tr/tr
tr/tr
tr/tr
tr/tr
tr/tr
tr/tr
  /tbody
  tbody
tr
  tdRow 11, Column 1/td
  tdRow 11, Column 2/td
  tdRow 11, Column 3/td
/tr
tr
  tdRow 12, Column 1/td
  tdRow 12, Column 2/td
  tdRow 12, Column 3/td
/tr
tr
  tdRow 13, Column 1/td
  tdRow 13, Column 2/td
  tdRow 13, Column 3/td
/tr
tr
  tdRow 14, Column 1/td
  tdRow 14, Column 2/td
  tdRow 14, Column 3/td
/tr
tr
  tdRow 15, Column 1/td
  tdRow 15, Column 2/td
  tdRow 15, Column 3/td
/tr
  /tbody
/table

.. then when I navigate to the Row 11, Column 1 cell, VoiceOver announces
row 11 of 15 Row 11, Column 1.  Also, Chrome then exposes 15 AXRow
children of the AXTable.

Using the original example in Internet Explorer 11, IE11 is exposing only 6
rows like Chrome, Safari, and Firefox; with the Windows SDK Inspect tool, I
see that the UIA_TableControlTypeId has the Grid.RowCount attribute set to
6.  Switching on Narrator, when I navigate to the Row 11, Column 1 cell,
Narrator announces Row 11, Column 1. Column 1 row 2 item.  Using the
modified HTML containing the 9 empty TR elements, the Grid.RowCount
attribute is set to 15 and Narrator will announce Row 11, Column 1. Column
1 row 11 item for the Row 11, Column 1 cell.

I am fairly certain that the model of the table that browsers expose to the
accessibility layer should match the HTML5 table model, but I wanted to
confirm.  Also, I wanted to ask what the ARIA semantics of the implied rows
are.

For example, suppose I have this (admittedly contrived):

table border=1
  tbody
tr aria-selected=true role=row
  td rowspan=5Spans 5/td
  tdnbsp;/td
  tdnbsp;/td
  tdnbsp;/td
/tr
tr aria-disabled=true role=presentation
  td rowspan=4Spans 4/td
  tdnbsp;/td
  tdnbsp;/td
/tr
tr aria-hidden=true role=row
  td rowspan=3Spans 3/td
  tdnbsp;/td
/tr
tr aria-busy=true role=presentation
  td rowspan=2Spans 2/td
/tr
  /tbody
/table

There is 1 implied row in this example, but what are the ARIA state
attributes of this implied row?  Is it selected and/or disabled and/or
hidden and/or busy?  What is the implied row's role?  There should probably
be a requirement that ARIA roles and state should be consistent.