[Webkit-unassigned] [Bug 179494] AX: AOM: Implement AccessibleNode class and support label and role attributes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 9 18:28:52 PST 2017


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

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

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

>> Source/WebCore/accessibility/AccessibilityListBoxOption.cpp:145
>> +    const AtomicString& ariaLabel = getPropertyStringValue(AXPropertyValueKeys::kAXLabel);
> 
> can we use a namespace to avoid appending AXPropertyValueKeys:: everywhere?

I don't think we can do that for enum class.

>> Source/WebCore/accessibility/AccessibleNode.cpp:83
>> +
> 
> is there a way to avoid encoding "StringValue" into the name and just have it choose the right type based on return type?

I tried template function but I think it gets more complicated if we are going to return value, reference and pointer in future.
I think it's quite clear right now since the clients know what type of return value they want and can call the corresponding functions.

>> Source/WebCore/accessibility/AccessibleNode.cpp:98
>> +        return element->attributeWithoutSynchronization(roleAttr);
> 
> can we make the switch set the attributeName to a variable, then below that call 
> 
> element->attributeWithoutSynchronization(X);
> 
> one time

Added a AOM <-> ARIA map

>> Source/WebCore/accessibility/AccessibleNode.cpp:104
>> +const String AccessibleNode::getStringProperty(Element* element, AXPropertyValueKeys propertyKey)
> 
> can this be a String&

I hit a crash assert saying accessing the AtomicString from different threads if change to String&

-- 
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/20171110/1553d151/attachment-0001.html>


More information about the webkit-unassigned mailing list