Bug 171214 - AX: aria-rowspan value should be ignored if td/th rowspan value is provided
Summary: AX: aria-rowspan value should be ignored if td/th rowspan value is provided
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joanmarie Diggs
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-24 03:08 PDT by Joanmarie Diggs
Modified: 2017-05-03 18:40 PDT (History)
9 users (show)

See Also:


Attachments
Patch (8.51 KB, patch)
2017-05-03 05:42 PDT, Joanmarie Diggs
no flags Details | Formatted Diff | Diff
Patch (10.19 KB, patch)
2017-05-03 16:23 PDT, Joanmarie Diggs
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2017-04-24 03:08:25 PDT
The ARIA spec states:

"If aria-rowspan is used on an element for which the host language provides an equivalent attribute, user agents must ignore the value of aria-rowspan and instead expose the value of the host language's attribute to assistive technologies." https://rawgit.com/w3c/aria/master/aria/aria.html#aria-rowspan

With this in mind, given this test case:

  <table>
    <tr>
      <th id="test" role="columnheader" rowspan="3" aria-rowspan="2">test cell</th>  
    </tr>
  </table>

Shouldn't AXRowIndexRange.length be 3? I'm getting 2.
Comment 1 Radar WebKit Bug Importer 2017-04-24 03:08:39 PDT
<rdar://problem/31784254>
Comment 2 Joanmarie Diggs 2017-05-03 05:42:11 PDT
Created attachment 308898 [details]
Patch
Comment 3 chris fleizach 2017-05-03 08:54:07 PDT
Comment on attachment 308898 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308898&action=review

> Source/WebCore/ChangeLog:9
> +        accessible object's renderer is a RenderTableCell. This is consistent with what

this would mean that you can't use aria table semantics on <table> and friends right? I understand that native semantics should win, but with the proliferation of <Table> being used to styling rather than data grid purposes, I don't know if this is the right move
Comment 4 Joanmarie Diggs 2017-05-03 09:01:06 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 308898 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=308898&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        accessible object's renderer is a RenderTableCell. This is consistent with what
> 
> this would mean that you can't use aria table semantics on <table> and
> friends right? I understand that native semantics should win, but with the
> proliferation of <Table> being used to styling rather than data grid
> purposes, I don't know if this is the right move

It's just for the column span and row span. And I am open to other suggestions.
Comment 5 chris fleizach 2017-05-03 09:11:31 PDT
Comment on attachment 308898 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308898&action=review

>>> Source/WebCore/ChangeLog:9
>>> +        accessible object's renderer is a RenderTableCell. This is consistent with what
>> 
>> this would mean that you can't use aria table semantics on <table> and friends right? I understand that native semantics should win, but with the proliferation of <Table> being used to styling rather than data grid purposes, I don't know if this is the right move
> 
> It's just for the column span and row span. And I am open to other suggestions.

I would think that ARIA  semantics would override the default values

<td aria-colspan=2> => 2
<td aria-colspan=2 colspan=3> => 3
<td  colspan=3> => 3
<td> => 1
Comment 6 Joanmarie Diggs 2017-05-03 09:31:34 PDT
(In reply to chris fleizach from comment #5)
> Comment on attachment 308898 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=308898&action=review
> 
> >>> Source/WebCore/ChangeLog:9
> >>> +        accessible object's renderer is a RenderTableCell. This is consistent with what
> >> 
> >> this would mean that you can't use aria table semantics on <table> and friends right? I understand that native semantics should win, but with the proliferation of <Table> being used to styling rather than data grid purposes, I don't know if this is the right move
> > 
> > It's just for the column span and row span. And I am open to other suggestions.
> 
> I would think that ARIA  semantics would override the default values
> 
> <td aria-colspan=2> => 2

The first one is, I believe, the only one in which I'm not doing what you suggest. So regarding that particular case: What you describe doesn't strike me as what the spec's normative statement is saying. So are you reading it differently? Or are you saying that what is in the spec is a bad idea, and we shouldn't implement it as described in the absence of explicit native host language attributes?
Comment 7 chris fleizach 2017-05-03 09:44:19 PDT
Comment on attachment 308898 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308898&action=review

>>>>> Source/WebCore/ChangeLog:9
>>>>> +        accessible object's renderer is a RenderTableCell. This is consistent with what
>>>> 
>>>> this would mean that you can't use aria table semantics on <table> and friends right? I understand that native semantics should win, but with the proliferation of <Table> being used to styling rather than data grid purposes, I don't know if this is the right move
>>> 
>>> It's just for the column span and row span. And I am open to other suggestions.
>> 
>> I would think that ARIA  semantics would override the default values
>> 
>> <td aria-colspan=2> => 2
>> <td aria-colspan=2 colspan=3> => 3
>> <td  colspan=3> => 3
>> <td> => 1
> 
> The first one is, I believe, the only one in which I'm not doing what you suggest. So regarding that particular case: What you describe doesn't strike me as what the spec's normative statement is saying. So are you reading it differently? Or are you saying that what is in the spec is a bad idea, and we shouldn't implement it as described in the absence of explicit native host language attributes?

I haven't studied the spec in detail, but from a similar example

<div required aria-required=false>. -> required == TRUE
but

<div aria-required=false>.  -> required == FALSE

To me it seems like we would honor aria attribute the author put over implicit default values
Comment 8 Joanmarie Diggs 2017-05-03 13:16:17 PDT
(In reply to chris fleizach from comment #7)
> I haven't studied the spec in detail, but from a similar example
> 
> <div required aria-required=false>. -> required == TRUE
> but
> 
> <div aria-required=false>.  -> required == FALSE
> 
> To me it seems like we would honor aria attribute the author put over
> implicit default values

OK. I'll do a new patch which does that. Thanks for the review and thoughts on the matter!
Comment 9 Joanmarie Diggs 2017-05-03 16:23:51 PDT
Created attachment 308981 [details]
Patch
Comment 10 WebKit Commit Bot 2017-05-03 18:40:48 PDT
Comment on attachment 308981 [details]
Patch

Clearing flags on attachment: 308981

Committed r216167: <http://trac.webkit.org/changeset/216167>
Comment 11 WebKit Commit Bot 2017-05-03 18:40:50 PDT
All reviewed patches have been landed.  Closing bug.