[Webkit-unassigned] [Bug 179500] AX: AOM: Implement relation type properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 4 14:04:10 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=179500

--- Comment #5 from Nan Wang <n_wang at apple.com> ---
Comment on attachment 328064
  --> https://bugs.webkit.org/attachment.cgi?id=328064
patch

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

>> Source/WebCore/accessibility/AccessibilityObject.cpp:2194
>> +            return elements.first();
> 
> What happens when elements contain more than one elements?
> Should that ever happen? If so, is it really correct to return nullptr in that case?
> Where is this behavior spec'ed?

I implemented this as a convenient function for relation types that only contain one AccessibleNode. Maybe we should add an assert here to make sure it only contains one element.
The more than one elements case should be addressed in another bug. In that case we could have elementsValueForProperty(property)
https://wicg.github.io/aom/spec/#accessiblenodelist-interface

>> Source/WebCore/accessibility/AccessibleNode.cpp:340
>> +    if (accessibleNodes.size() == 1)
> 
> Is it possible for accessibleNodes to have more than one items? If so, is it really correct to return nullptr.
> If that's not possible, we should assert that accessibleNodes.size() is either 0 or 1,
> and this check should instead be replaced by if (accessibleNodes.size()).

Yes I think an assert here is more appropriate. This is to cover the properties that only should contain one AccessibleNode.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171204/f95bfc51/attachment-0001.html>


More information about the webkit-unassigned mailing list