[Webkit-unassigned] [Bug 158634] AX: Form label text should be exposed as static text if it contains only static text
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 10 14:14:32 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=158634
--- Comment #3 from chris fleizach <cfleizach at apple.com> ---
Comment on attachment 281045
--> https://bugs.webkit.org/attachment.cgi?id=281045
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=281045&action=review
> Source/WebCore/ChangeLog:8
> + Use AccessibilityLabel to represent HTMLLabelElement to AT.
AT -> assistive technologies
> Source/WebCore/accessibility/AccessibilityLabel.cpp:71
> + if (!child->accessibilityIsIgnored() && !child->isDetached()) {
I think we're guaranteed to only have unignored children in m_children
The same might be true of detached children
> Source/WebCore/accessibility/AccessibilityLabel.cpp:76
> + staticText = true;
Seems like you don't need to keep track of staticText. As soon as you get a failure can you can just return false
Then you can return true at the end of it right
Also, you could probably cache this value and then update when children are updated
> Source/WebCore/accessibility/AccessibilityLabel.cpp:92
> + return WebCore::containsOnlyStaticText(m_children);
This WebCore:: prefix is probably unnecessary
> Source/WebCore/accessibility/AccessibilityLabel.h:41
> + AccessibilityRole roleValue() const override { return LabelRole; }
Add a final to these
roleValue and stringValue() can probably be private
> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2237
> + if (role == LabelRole && is<AccessibilityLabel>(*m_object) && downcast<AccessibilityLabel>(*m_object).containsOnlyStaticText())
This check
role == LabelRole
Is probably not necessary since is<AccessibilityLabel> guarantees role = Label
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160610/6ef792b3/attachment.html>
More information about the webkit-unassigned
mailing list