AX: <hr> should use a different role description than interactive separators
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 21:58:05 +0000 (21:58 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 21:58:05 +0000 (21:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170317
<rdar://problem/31363024>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Users are confused with WebKit's accessibility description of separators.
We should call these what they are, horizontal rules.

Updated test: accessibility/mac/hr-element-expected.txt

* English.lproj/Localizable.strings:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::orientation):
* platform/cocoa/LocalizedStringsCocoa.mm:
(WebCore::AXHorizontalRuleDescriptionText):

LayoutTests:

* accessibility/mac/hr-element-expected.txt:
* accessibility/mac/hr-element.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215532 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/mac/hr-element-expected.txt
LayoutTests/accessibility/mac/hr-element.html
LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm

index 195d171..6801d0c 100644 (file)
@@ -1,3 +1,14 @@
+2017-04-19  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: <hr> should use a different role description than interactive separators
+        https://bugs.webkit.org/show_bug.cgi?id=170317
+        <rdar://problem/31363024>
+
+        Reviewed by Joanmarie Diggs.
+
+        * accessibility/mac/hr-element-expected.txt:
+        * accessibility/mac/hr-element.html:
+
 2017-04-19  JF Bastien  <jfbastien@apple.com>
 
         Unreviewed, rolling out r215520.
index 91019e4..59be906 100644 (file)
@@ -5,25 +5,36 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 hr1 role: AXRole: AXSplitter
 hr1 subrole: AXSubrole: AXContentSeparator
-hr1 roleDescription: AXRoleDescription: separator
+hr1 roleDescription: AXRoleDescription: rule
 hr1 description: AXDescription: 
 hr1 is value settable: false
+hr1 orientation: AXOrientation: AXHorizontalOrientation
 hr1 is enabled: false
 
 hr2 role: AXRole: AXSplitter
 hr2 subrole: AXSubrole: AXContentSeparator
-hr2 roleDescription: AXRoleDescription: separator
+hr2 roleDescription: AXRoleDescription: rule
 hr2 description: AXDescription: 
 hr2 is value settable: false
+hr2 orientation: AXOrientation: AXHorizontalOrientation
 hr2 is enabled: false
 
 hr3 role: AXRole: AXSplitter
 hr3 subrole: AXSubrole: AXContentSeparator
-hr3 roleDescription: AXRoleDescription: separator
+hr3 roleDescription: AXRoleDescription: rule
 hr3 description: AXDescription: RULER
 hr3 is value settable: false
+hr3 orientation: AXOrientation: AXHorizontalOrientation
 hr3 is enabled: false
 
+hr4 role: AXRole: AXSplitter
+hr4 subrole: AXSubrole: AXContentSeparator
+hr4 roleDescription: AXRoleDescription: rule
+hr4 description: AXDescription: 
+hr4 is value settable: false
+hr4 orientation: AXOrientation: AXVerticalOrientation
+hr4 is enabled: false
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 742a057..d2947e3 100644 (file)
@@ -11,6 +11,8 @@
 <hr id="hr2">
 
 <hr id="hr3" aria-label="RULER" tabindex="0">
+
+<hr id="hr4" aria-orientation="vertical">
 </div>
 
 <p id="description"></p>
 
     if (window.accessibilityController) {
 
-        for (var k = 1; k <= 3; k++) {
+        for (var k = 1; k <= 4; k++) {
            var hr = accessibilityController.accessibleElementById("hr" + k);
            debug("hr" + k + " role: " + hr.role);
            debug("hr" + k + " subrole: " + hr.subrole);
            debug("hr" + k + " roleDescription: " + hr.roleDescription);
            debug("hr" + k + " description: " + hr.description);
            debug("hr" + k + " is value settable: " + hr.isAttributeSettable('AXValue'));
+           debug("hr" + k + " orientation: " + hr.orientation);
            debug("hr" + k + " is enabled: " + hr.isEnabled + "\n");
         }
         document.getElementById("content").style.visibility = "none";
index 81845cc..42a3aa6 100644 (file)
@@ -182,7 +182,7 @@ h6
 hr
       AXRole: AXSplitter
       AXSubrole: AXContentSeparator
-      AXRoleDescription: separator
+      AXRoleDescription: rule
       
 i
       AXRole: 
index 0d1529f..ef692f9 100644 (file)
@@ -1,3 +1,22 @@
+2017-04-19  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: <hr> should use a different role description than interactive separators
+        https://bugs.webkit.org/show_bug.cgi?id=170317
+        <rdar://problem/31363024>
+
+        Reviewed by Joanmarie Diggs.
+
+        Users are confused with WebKit's accessibility description of separators. 
+        We should call these what they are, horizontal rules.
+
+        Updated test: accessibility/mac/hr-element-expected.txt
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::orientation):
+        * platform/cocoa/LocalizedStringsCocoa.mm:
+        (WebCore::AXHorizontalRuleDescriptionText):
+
 2017-04-19  Anders Carlsson  <andersca@apple.com>
 
         Rename cancelPayment to cancelPaymentSession
index fef00a1..c06fdc2 100644 (file)
 "select" = "select";
 
 /* accessibility role description for a horizontal rule [<hr>] */
-"separator" = "separator";
+"rule" = "rule";
 
 /* HTTP result code string */
 "server error" = "server error";
index 28bb1e9..129b6e2 100644 (file)
@@ -230,7 +230,7 @@ String AXARIAContentGroupText(const String& ariaType)
 
 String AXHorizontalRuleDescriptionText()
 {
-    return WEB_UI_STRING("separator", "accessibility role description for a horizontal rule [<hr>]");
+    return WEB_UI_STRING("rule", "accessibility role description for a horizontal rule [<hr>]");
 }
 
 String AXMarkText()