Changeset 168042 in webkit
- Timestamp:
- Apr 30, 2014 1:47:16 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168031 r168042 1 2014-04-30 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Make "contenteditable" regions into AXTextAreas 4 https://bugs.webkit.org/show_bug.cgi?id=132379 5 6 Reviewed by Mario Sanchez Prada. 7 8 * accessibility/content-editable-as-textarea.html: Added. 9 * platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt: Added. 10 * platform/mac/accessibility/content-editable-as-textarea-expected.txt: Added. 11 1 12 2014-04-30 David Kilzer <ddkilzer@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r168041 r168042 1 2014-04-29 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Make "contenteditable" regions into AXTextAreas 4 https://bugs.webkit.org/show_bug.cgi?id=132379 5 6 Reviewed by Mario Sanchez Prada. 7 8 Make contenteditable regions into AXTextAreas. This will allow for a more standardized 9 interface for interaction with assistive technologies. 10 11 Test: accessibility/content-editable-as-textarea.html 12 13 * accessibility/AccessibilityNodeObject.cpp: 14 (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet): 15 * accessibility/AccessibilityObject.cpp: 16 (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled): 17 * accessibility/AccessibilityObject.h: 18 * accessibility/AccessibilityRenderObject.cpp: 19 (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange): 20 (WebCore::AccessibilityRenderObject::selectedText): 21 (WebCore::AccessibilityRenderObject::selectedTextRange): 22 (WebCore::AccessibilityRenderObject::renderObjectIsObservable): 23 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 24 (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted. 25 * accessibility/AccessibilityRenderObject.h: 26 1 27 2014-04-30 Brian J. Burg <burg@cs.washington.edu> 2 28 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r167054 r168042 2013 2013 bool AccessibilityNodeObject::hasContentEditableAttributeSet() const 2014 2014 { 2015 if (!hasAttribute(contenteditableAttr)) 2016 return false; 2017 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr); 2018 // Both "true" (case-insensitive) and the empty string count as true. 2019 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableValue, "true"); 2015 return contentEditableAttributeIsEnabled(element()); 2020 2016 } 2021 2017 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r167755 r168042 1315 1315 return obj->document().axObjectCache()->getOrCreate(obj); 1316 1316 } 1317 1317 1318 bool AccessibilityObject::contentEditableAttributeIsEnabled(Element* element) 1319 { 1320 if (!element) 1321 return false; 1322 1323 if (!element->hasAttribute(contenteditableAttr)) 1324 return false; 1325 1326 const AtomicString& contentEditableValue = element->fastGetAttribute(contenteditableAttr); 1327 // Both "true" (case-insensitive) and the empty string count as true. 1328 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableValue, "true"); 1329 } 1330 1318 1331 #if HAVE(ACCESSIBILITY) 1319 1332 int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) const -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r167024 r168042 844 844 static const String defaultLiveRegionStatusForRole(AccessibilityRole); 845 845 static bool liveRegionStatusIsEnabled(const AtomicString&); 846 static bool contentEditableAttributeIsEnabled(Element*); 846 847 847 848 bool supportsARIAAttributes() const; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r167803 r168042 1421 1421 } 1422 1422 1423 PlainTextRange AccessibilityRenderObject:: ariaSelectedTextRange() const1423 PlainTextRange AccessibilityRenderObject::documentBasedSelectedTextRange() const 1424 1424 { 1425 1425 Node* node = m_renderer->node(); … … 1450 1450 } 1451 1451 1452 if (ariaRoleAttribute() == UnknownRole) 1453 return String(); 1454 1455 return doAXStringForRange(ariaSelectedTextRange()); 1452 return doAXStringForRange(documentBasedSelectedTextRange()); 1456 1453 } 1457 1454 … … 1484 1481 } 1485 1482 1486 if (ariaRole == UnknownRole) 1487 return PlainTextRange(); 1488 1489 return ariaSelectedTextRange(); 1483 return documentBasedSelectedTextRange(); 1490 1484 } 1491 1485 … … 2395 2389 // AX clients will listen for AXSelectedChildrenChanged on listboxes. 2396 2390 Node* node = renderer->node(); 2391 if (!node) 2392 return false; 2393 2397 2394 if (nodeHasRole(node, "listbox") || (renderer->isBoxModelObject() && toRenderBoxModelObject(renderer)->isListBox())) 2398 2395 return true; 2399 2396 2400 2397 // Textboxes should send out notifications. 2401 if (nodeHasRole(node, "textbox") )2398 if (nodeHasRole(node, "textbox") || (node->isElementNode() && contentEditableAttributeIsEnabled(toElement(node)))) 2402 2399 return true; 2403 2400 … … 2511 2508 #endif 2512 2509 } 2513 2510 2511 if (hasContentEditableAttributeSet()) 2512 return TextAreaRole; 2513 2514 2514 if (isFileUploadButton()) 2515 2515 return ButtonRole; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h
r166649 r168042 234 234 bool hasTextAlternative() const; 235 235 String positionalDescriptionForMSAA() const; 236 PlainTextRange ariaSelectedTextRange() const;236 PlainTextRange documentBasedSelectedTextRange() const; 237 237 Element* rootEditableElementForPosition(const Position&) const; 238 238 bool nodeIsTextControl(const Node*) const;
Note: See TracChangeset
for help on using the changeset viewer.