AX: Crash at  WebCore::AccessibilityObject::getAttribute const + 9
https://bugs.webkit.org/show_bug.cgi?id=157256

Reviewed by Chris Fleizach.

Source/WebCore:

When the <label> for the input element has no renderer, it will cause
crash when we ask for the title element text. Fixed it by getting the
aria-label attribute directly from the <label> element instead of its
accessibility object.

Test case covered in accessibility/mac/aria-label-on-label-element.html.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):

LayoutTests:

* accessibility/mac/aria-label-on-label-element-expected.txt:
* accessibility/mac/aria-label-on-label-element.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed