Title: [152125] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/LayoutTests/ChangeLog (152124 => 152125)


--- branches/safari-537-branch/LayoutTests/ChangeLog	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/LayoutTests/ChangeLog	2013-06-27 22:16:21 UTC (rev 152125)
@@ -1,3 +1,18 @@
+2013-06-27  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r151841
+
+    2013-06-20  Brent Fulgham  <bfulg...@apple.com>
+
+            [Windows] AX: Radio buttons with "tab" role should describe themselves as tabs.
+            https://bugs.webkit.org/show_bug.cgi?id=117837
+
+            Reviewed by Chris Fleizach.
+
+            * accessibility/aria-tab-role-on-buttons.html: Added.
+            * accessibility/aria-tab-role-on-buttons-expected.txt: Added.
+            * platform/win/aria-tab-role-on-buttons-expected.txt: Added.
+
 2013-06-26  Lucas Forschler  <lforsch...@apple.com>
 
         Merge r151998

Copied: branches/safari-537-branch/LayoutTests/accessibility/aria-tab-role-on-buttons.html (from rev 152108, tags/Safari-537.47/LayoutTests/accessibility/aria-tab-role-on-buttons.html) (0 => 152125)


--- branches/safari-537-branch/LayoutTests/accessibility/aria-tab-role-on-buttons.html	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/accessibility/aria-tab-role-on-buttons.html	2013-06-27 22:16:21 UTC (rev 152125)
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div role="tablist">
+    <button id="tab a" role="tab" aria-selected="true">Tab A</button>
+    <button id="tab b" role="tab" aria-selected="false">Tab B</button>
+    <button id="tab c" role="tab" aria-selected="false">Tab C</button>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that the aria roles for tab and tablist work as expected for buttons.");
+
+    if (window.accessibilityController) {
+
+          var body = document.getElementById("body");
+          body.focus();
+
+          var tabList = accessibilityController.focusedElement.childAtIndex(0);
+          var tab1 = tabList.childAtIndex(0);
+          var tab2 = tabList.childAtIndex(1);
+          var tabPanel = accessibilityController.focusedElement.childAtIndex(1);
+
+          debug("tabList.role = " + tabList.role);
+          debug("tab1.role = " + tab1.role);
+          debug("tab1.title = " + tab1.title);
+          shouldBe("tab1.childrenCount", "0");
+          debug("tab2.role = " + tab2.role);
+          debug("tab2.title = " + tab2.title);
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Copied: branches/safari-537-branch/LayoutTests/platform/mac/accessibility/aria-tab-role-on-buttons-expected.txt (from rev 152108, tags/Safari-537.47/LayoutTests/platform/mac/accessibility/aria-tab-role-on-buttons-expected.txt) (0 => 152125)


--- branches/safari-537-branch/LayoutTests/platform/mac/accessibility/aria-tab-role-on-buttons-expected.txt	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/platform/mac/accessibility/aria-tab-role-on-buttons-expected.txt	2013-06-27 22:16:21 UTC (rev 152125)
@@ -0,0 +1,16 @@
+Tab A  Tab B  Tab C
+This tests that the aria roles for tab and tablist work as expected for buttons.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+tabList.role = AXRole: AXTabGroup
+tab1.role = AXRole: AXRadioButton
+tab1.title = AXTitle: Tab A
+PASS tab1.childrenCount is 0
+tab2.role = AXRole: AXRadioButton
+tab2.title = AXTitle: Tab B
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/safari-537-branch/LayoutTests/platform/win/accessibility/aria-tab-role-on-buttons-expected.txt (from rev 152108, tags/Safari-537.47/LayoutTests/platform/win/accessibility/aria-tab-role-on-buttons-expected.txt) (0 => 152125)


--- branches/safari-537-branch/LayoutTests/platform/win/accessibility/aria-tab-role-on-buttons-expected.txt	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/platform/win/accessibility/aria-tab-role-on-buttons-expected.txt	2013-06-27 22:16:21 UTC (rev 152125)
@@ -0,0 +1,16 @@
+Tab A  Tab B  Tab C
+This tests that the aria roles for tab and tablist work as expected for buttons.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+tabList.role = page tab list
+tab1.role = page tab
+tab1.title = Tab A
+PASS tab1.childrenCount is 0
+tab2.role = page tab
+tab2.title = Tab B
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152124 => 152125)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-06-27 22:16:21 UTC (rev 152125)
@@ -1,5 +1,23 @@
 2013-06-27  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r151841
+
+    2013-06-20  Brent Fulgham  <bfulg...@apple.com>
+
+            [Windows] AX: Radio buttons with "tab" role should describe themselves as tabs
+            https://bugs.webkit.org/show_bug.cgi?id=117837
+
+            Reviewed by Chris Fleizach.
+
+            accessibility/aria-tab-role-on-buttons.html
+
+            * accessibility/AccessibilityNodeObject.cpp:
+            (WebCore::AccessibilityNodeObject::canSetSelectedAttribute): Indicate that certain accessibility
+            types (such as Tabs) can be selected.
+            * accessibility/AccessibilityNodeObject.h: Signature for canSelectAttribute override.
+
+2013-06-27  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r151778
 
     2013-06-19  Brent Fulgham  <bfulg...@apple.com>

Modified: branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (152124 => 152125)


--- branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-06-27 22:16:21 UTC (rev 152125)
@@ -1902,4 +1902,23 @@
     return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableValue, "true");
 }
 
+bool AccessibilityNodeObject::canSetSelectedAttribute() const
+{
+    // Elements that can be selected
+    switch (roleValue()) {
+    case CellRole:
+    case RadioButtonRole:
+    case RowHeaderRole:
+    case RowRole:
+    case TabListRole:
+    case TabRole:
+    case TreeGridRole:
+    case TreeItemRole:
+    case TreeRole:
+        return isEnabled();
+    default:
+        return false;
+    }
+}
+
 } // namespace WebCore

Modified: branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.h (152124 => 152125)


--- branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.h	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/Source/WebCore/accessibility/AccessibilityNodeObject.h	2013-06-27 22:16:21 UTC (rev 152125)
@@ -100,6 +100,8 @@
     virtual bool isRequired() const;
     virtual bool supportsRequiredAttribute() const;
 
+    virtual bool canSetSelectedAttribute() const OVERRIDE;
+
     void setNode(Node*);
     virtual Node* node() const { return m_node; }
     virtual Document* document() const;

Modified: branches/safari-537-branch/Source/WebKit/win/AccessibleBase.cpp (152124 => 152125)


--- branches/safari-537-branch/Source/WebKit/win/AccessibleBase.cpp	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/Source/WebKit/win/AccessibleBase.cpp	2013-06-27 22:16:21 UTC (rev 152125)
@@ -918,11 +918,8 @@
             return ROLE_SYSTEM_OUTLINEITEM;
         case WebCore::TabPanelRole:
             return ROLE_SYSTEM_GROUPING;
-        // Note: TabRole seems like it should map to ROLE_SYSTEM_PAGETAB, but Mac OS maps
-        // this to the equivalent of ROLE_SYSTEM_RADIOBUTTON. To provide consistent behavior
-        // on both platforms we will follow that mapping:
         case WebCore::TabRole:
-            return ROLE_SYSTEM_RADIOBUTTON;
+            return ROLE_SYSTEM_PAGETAB;
         case WebCore::ApplicationRole:
             return ROLE_SYSTEM_APPLICATION;
         case WebCore::ApplicationDialogRole:

Modified: branches/safari-537-branch/Source/WebKit/win/ChangeLog (152124 => 152125)


--- branches/safari-537-branch/Source/WebKit/win/ChangeLog	2013-06-27 22:15:32 UTC (rev 152124)
+++ branches/safari-537-branch/Source/WebKit/win/ChangeLog	2013-06-27 22:16:21 UTC (rev 152125)
@@ -1,5 +1,19 @@
 2013-06-27  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r151841
+
+    2013-06-20  Brent Fulgham  <bfulg...@apple.com>
+
+            [Windows] AX: Radio buttons with "tab" role should describe themselves as tabs.
+            https://bugs.webkit.org/show_bug.cgi?id=117837
+
+            Reviewed by Chris Fleizach.
+
+            * AccessibleBase.cpp:
+            (MSAARole): Don't expose TabRole as a radio button to satisfy buggy screen readers.
+
+2013-06-27  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r151745
 
     2013-06-19  Brent Fulgham  <bfulg...@apple.com>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to