Title: [164685] trunk
Revision
164685
Author
[email protected]
Date
2014-02-25 17:27:55 -0800 (Tue, 25 Feb 2014)

Log Message

Add accessibility search predicate support for AXOutlines
https://bugs.webkit.org/show_bug.cgi?id=123748

Reviewed by Chris Fleizach.

Source/WebCore:

Added new AXOutlineSearchKey to support finding elements with aria role=tree.

No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilitySearchKeyMap):

LayoutTests:

Updated test to validate support for AXOutlineSearchKey (elements with aria role=tree).

* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164684 => 164685)


--- trunk/LayoutTests/ChangeLog	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/LayoutTests/ChangeLog	2014-02-26 01:27:55 UTC (rev 164685)
@@ -1,3 +1,15 @@
+2014-02-25  Samuel White  <[email protected]>
+
+        Add accessibility search predicate support for AXOutlines
+        https://bugs.webkit.org/show_bug.cgi?id=123748
+
+        Reviewed by Chris Fleizach.
+
+        Updated test to validate support for AXOutlineSearchKey (elements with aria role=tree).
+
+        * platform/mac/accessibility/search-predicate-expected.txt:
+        * platform/mac/accessibility/search-predicate.html:
+
 2014-02-25  Laszlo Vidacs  <[email protected]>
 
         display:table with padding and/or borders in border-box calculates height incorrectly

Modified: trunk/LayoutTests/platform/mac/accessibility/search-predicate-expected.txt (164684 => 164685)


--- trunk/LayoutTests/platform/mac/accessibility/search-predicate-expected.txt	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/LayoutTests/platform/mac/accessibility/search-predicate-expected.txt	2014-02-26 01:27:55 UTC (rev 164685)
@@ -33,6 +33,7 @@
 first table body level 1
 second table heading level 1
 second table body level 1
+tree item
 isVisible test start
 
 test button 1
@@ -95,6 +96,8 @@
 PASS resultElement.role is 'AXRole: AXList'
 PASS resultElement.role is 'AXRole: AXGroup'
 PASS resultElement.stringAttributeValue('AXARIALive') is 'polite'
+PASS resultElement.role is 'AXRole: AXOutline'
+PASS resultElement.childAtIndex(0).childAtIndex(0).stringValue is 'AXValue: tree item'
 PASS resultElement.role is 'AXRole: AXStaticText'
 PASS resultElement.stringValue is 'AXValue: first blockquote level 1'
 PASS resultElement.role is 'AXRole: AXRadioGroup'

Modified: trunk/LayoutTests/platform/mac/accessibility/search-predicate.html (164684 => 164685)


--- trunk/LayoutTests/platform/mac/accessibility/search-predicate.html	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/LayoutTests/platform/mac/accessibility/search-predicate.html	2014-02-26 01:27:55 UTC (rev 164685)
@@ -35,6 +35,7 @@
 <thead><tr><td>second table heading level 1</td></tr></thead>
 <tbody><tr><td>second table body level 1</td></tr></tbody>
 </table>
+<ul role="tree"><li role="treeitem">tree item</li></ul>
 
 <h1>isVisible test start</h1>
 <div id="group" style="overflow: scroll; width:100px; height:100px;">
@@ -210,6 +211,12 @@
         // Misspelled word.
         // FIXME: Handle this search key.
         
+        // Outline.
+        startElement = accessibilityController.focusedElement.childAtIndex(0);
+        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXOutlineSearchKey", "", false);
+        shouldBe("resultElement.role", "'AXRole: AXOutline'");
+        shouldBe("resultElement.childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: tree item'");
+        
         // Plain text.
         startElement = accessibilityController.focusedElement.childAtIndex(0);
         resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXPlainTextSearchKey", "", false);

Modified: trunk/Source/WebCore/ChangeLog (164684 => 164685)


--- trunk/Source/WebCore/ChangeLog	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/Source/WebCore/ChangeLog	2014-02-26 01:27:55 UTC (rev 164685)
@@ -1,3 +1,20 @@
+2014-02-25  Samuel White  <[email protected]>
+
+        Add accessibility search predicate support for AXOutlines
+        https://bugs.webkit.org/show_bug.cgi?id=123748
+
+        Reviewed by Chris Fleizach.
+
+        Added new AXOutlineSearchKey to support finding elements with aria role=tree.
+
+        No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilitySearchKeyMap):
+
 2014-02-25  Mark Lam  <[email protected]>
 
         Need to initialize VM stack data even when the VM is on an exclusive thread.

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (164684 => 164685)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2014-02-26 01:27:55 UTC (rev 164685)
@@ -203,6 +203,9 @@
     case MisspelledWordSearchKey:
         return axObject->hasMisspelling();
         
+    case OutlineSearchKey:
+        return axObject->isTree();
+        
     case PlainTextSearchKey:
         return axObject->hasPlainText();
         

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (164684 => 164685)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.h	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h	2014-02-26 01:27:55 UTC (rev 164685)
@@ -316,6 +316,7 @@
     ListSearchKey,
     LiveRegionSearchKey,
     MisspelledWordSearchKey,
+    OutlineSearchKey,
     PlainTextSearchKey,
     RadioGroupSearchKey,
     SameTypeSearchKey,

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (164684 => 164685)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2014-02-26 01:06:00 UTC (rev 164684)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2014-02-26 01:27:55 UTC (rev 164685)
@@ -326,6 +326,10 @@
 #define NSAccessibilityMisspelledWordSearchKey @"AXMisspelledWordSearchKey"
 #endif
 
+#ifndef NSAccessibilityOutlineSearchKey
+#define NSAccessibilityOutlineSearchKey @"AXOutlineSearchKey"
+#endif
+
 #ifndef NSAccessibilityPlainTextSearchKey
 #define NSAccessibilityPlainTextSearchKey @"AXPlainTextSearchKey"
 #endif
@@ -553,6 +557,7 @@
         { NSAccessibilityListSearchKey, ListSearchKey },
         { NSAccessibilityLiveRegionSearchKey, LiveRegionSearchKey },
         { NSAccessibilityMisspelledWordSearchKey, MisspelledWordSearchKey },
+        { NSAccessibilityOutlineSearchKey, OutlineSearchKey },
         { NSAccessibilityPlainTextSearchKey, PlainTextSearchKey },
         { NSAccessibilityRadioGroupSearchKey, RadioGroupSearchKey },
         { NSAccessibilitySameTypeSearchKey, SameTypeSearchKey },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to