Bug 171496

Summary: [ATK] Expose values of aria-rowcount, aria-colcount, aria-rowindex, aria-colindex, aria-rowspan, and aria-colspan as object attributes
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Joanmarie Diggs <jdiggs>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jcraig, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Joanmarie Diggs 2017-05-01 07:37:22 PDT
Expose values of aria-rowcount, aria-colcount, aria-rowindex, aria-colindex, aria-rowspan, and aria-colspan as object attributes
Comment 1 Radar WebKit Bug Importer 2017-05-01 07:37:48 PDT
<rdar://problem/31914069>
Comment 2 Joanmarie Diggs 2017-05-01 07:56:04 PDT
Created attachment 308720 [details]
Patch
Comment 3 chris fleizach 2017-05-01 08:48:38 PDT
Comment on attachment 308720 [details]
Patch

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

> Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:416
> +        if (coreObject->hasAttribute(HTMLNames::aria_rowspanAttr))

surprised we have to query the attribute directly here. should we make a method to expose rowSpan/colSpan?
Comment 4 Joanmarie Diggs 2017-05-01 08:56:55 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 308720 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=308720&action=review
> 
> > Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:416
> > +        if (coreObject->hasAttribute(HTMLNames::aria_rowspanAttr))
> 
> surprised we have to query the attribute directly here. should we make a
> method to expose rowSpan/colSpan?

We do have a method to expose it, and I use it, e.g. cell.ariaRowSpan().

The problem is that on my platform, the attribute should be exposed if the author has provided it. We return a default value of 1 on the spans, and 1 is valid. So it it author provided or set by WebCore?

I could change the return value to 0, as was done with rowcount and colcount, and then modify the platform code. You think I should go that route?
Comment 5 chris fleizach 2017-05-01 08:58:40 PDT
(In reply to Joanmarie Diggs (irc: joanie) from comment #4)
> (In reply to chris fleizach from comment #3)
> > Comment on attachment 308720 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=308720&action=review
> > 
> > > Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:416
> > > +        if (coreObject->hasAttribute(HTMLNames::aria_rowspanAttr))
> > 
> > surprised we have to query the attribute directly here. should we make a
> > method to expose rowSpan/colSpan?
> 
> We do have a method to expose it, and I use it, e.g. cell.ariaRowSpan().
> 
> The problem is that on my platform, the attribute should be exposed if the
> author has provided it. We return a default value of 1 on the spans, and 1
> is valid. So it it author provided or set by WebCore?
> 
> I could change the return value to 0, as was done with rowcount and
> colcount, and then modify the platform code. You think I should go that
> route?

It feels like we should be consistent with that model now (0 is no value provided)

thanks
Comment 6 Joanmarie Diggs 2017-05-01 12:41:05 PDT
Created attachment 308751 [details]
Patch
Comment 7 Joanmarie Diggs 2017-05-01 12:43:33 PDT
(In reply to chris fleizach from comment #5)

> It feels like we should be consistent with that model now (0 is no value
> provided)

It turns out 0 is a valid value for authors to provide. Returning -1 is consistent with what we do with ariaRowIndex() and ariaColumnIndex().
Comment 8 WebKit Commit Bot 2017-05-01 14:19:13 PDT
Comment on attachment 308751 [details]
Patch

Clearing flags on attachment: 308751

Committed r216028: <http://trac.webkit.org/changeset/216028>
Comment 9 WebKit Commit Bot 2017-05-01 14:19:14 PDT
All reviewed patches have been landed.  Closing bug.