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.  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?
Nan and Chris: Thoughts on 0 instead of -1?
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.
(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
Created attachment 308691 [details]
Chris: Please review. Thanks!
Comment on attachment 308691 [details]
Clearing flags on attachment: 308691
Committed r216009: <http://trac.webkit.org/changeset/216009>
All reviewed patches have been landed. Closing bug.