Bug 171475 - AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
Summary: AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not retur...
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 (irc: joanie)
URL:
Keywords: InRadar
Depends on:
Blocks: 171172
  Show dependency treegraph
 
Reported: 2017-04-29 07:02 PDT by Joanmarie Diggs (irc: joanie)
Modified: 2017-05-01 00:56 PDT (History)
10 users (show)

See Also:


Attachments
Patch (8.44 KB, patch)
2017-04-30 07:40 PDT, Joanmarie Diggs (irc: joanie)
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 (irc: joanie) 2017-04-29 07:02:18 PDT
Currently, AccessibilityTable::ariaRowCount() and AccessibilityTable::ariaColumnCount() return the author-provided value, only if that value is greater than the number of rows/columns in the DOM. Otherwise, it returns -1. This is problematic:

-1 is a valid author-provided value which means something specific, namely that the number of rows/columns is not known and should not be calculated by the user agent. [1][2] If the author-provided value happens to be equal to the number of rows/columns in the DOM -- or if the author didn't provide a value because the spec says they don't have to if the count is the same as what's in the DOM -- we do not want to tell ATs that the number is unknown.

I think we need to come up with some other return value which means "no valid author-provided value." (The spec also says that authors have to provide a number that reflects the total number. So if the number provided is less than what's in the DOM, that's author error.) What about 0?

[1] https://rawgit.com/w3c/aria/master/aria/aria.html#aria-rowcount
[2] https://rawgit.com/w3c/aria/master/aria/aria.html#aria-colcount
Comment 1 Radar WebKit Bug Importer 2017-04-29 07:03:19 PDT
<rdar://problem/31904487>
Comment 2 Joanmarie Diggs (irc: joanie) 2017-04-29 07:05:15 PDT
Nan and Chris: Thoughts on 0 instead of -1?
Comment 3 Nan Wang 2017-04-29 12:07:07 PDT
Yes, I think currently invalid value and -1 are treated the same that AT won't know if it's invalid, unset or unknown.

So if the value is not set or author error, we return 0. Otherwise we return the author provided number? I think that works.
Comment 4 chris fleizach 2017-04-29 23:31:57 PDT
(In reply to Nan Wang from comment #3)
> Yes, I think currently invalid value and -1 are treated the same that AT
> won't know if it's invalid, unset or unknown.
> 
> So if the value is not set or author error, we return 0. Otherwise we return
> the author provided number? I think that works.

ok. we may need to update VoiceOver. I doubt we do anything special with negative numbers
Comment 5 Joanmarie Diggs (irc: joanie) 2017-04-30 07:40:04 PDT
Created attachment 308691 [details]
Patch
Comment 6 Joanmarie Diggs (irc: joanie) 2017-04-30 22:05:07 PDT
Chris: Please review. Thanks!
Comment 7 WebKit Commit Bot 2017-05-01 00:56:21 PDT
Comment on attachment 308691 [details]
Patch

Clearing flags on attachment: 308691

Committed r216009: <http://trac.webkit.org/changeset/216009>
Comment 8 WebKit Commit Bot 2017-05-01 00:56:23 PDT
All reviewed patches have been landed.  Closing bug.