Bug 171475

Summary: AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
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, n_wang, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 171172    
Attachments:
Description Flags
Patch none

Joanmarie Diggs
Reported 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
Attachments
Patch (8.44 KB, patch)
2017-04-30 07:40 PDT, Joanmarie Diggs
no flags
Radar WebKit Bug Importer
Comment 1 2017-04-29 07:03:19 PDT
Joanmarie Diggs
Comment 2 2017-04-29 07:05:15 PDT
Nan and Chris: Thoughts on 0 instead of -1?
Nan Wang
Comment 3 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.
chris fleizach
Comment 4 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
Joanmarie Diggs
Comment 5 2017-04-30 07:40:04 PDT
Joanmarie Diggs
Comment 6 2017-04-30 22:05:07 PDT
Chris: Please review. Thanks!
WebKit Commit Bot
Comment 7 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>
WebKit Commit Bot
Comment 8 2017-05-01 00:56:23 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.