diff --git a/accessible/src/base/nsARIAMap.cpp b/accessible/src/base/nsARIAMap.cpp index 84b19d5c99a..62b086a0867 100644 --- a/accessible/src/base/nsARIAMap.cpp +++ b/accessible/src/base/nsARIAMap.cpp @@ -123,7 +123,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] = "columnheader", nsIAccessibleRole::ROLE_COLUMNHEADER, eNoValue, - eSortAction, + eNoAction, eNoLiveAttr, kNoReqStates, {&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE}, @@ -417,7 +417,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] = "rowheader", nsIAccessibleRole::ROLE_ROWHEADER, eNoValue, - eSortAction, + eNoAction, eNoLiveAttr, kNoReqStates, {&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE}, diff --git a/accessible/src/base/nsARIAMap.h b/accessible/src/base/nsARIAMap.h index 296e1d60ca7..99eb4311f02 100644 --- a/accessible/src/base/nsARIAMap.h +++ b/accessible/src/base/nsARIAMap.h @@ -57,11 +57,9 @@ enum EActionRule eActivateAction, eClickAction, eCheckUncheckAction, - eExpandAction, eJumpAction, eOpenCloseAction, eSelectAction, - eSortAction, eSwitchAction }; diff --git a/accessible/src/base/nsAccUtils.cpp b/accessible/src/base/nsAccUtils.cpp index 205197fda1c..3892b850b7f 100644 --- a/accessible/src/base/nsAccUtils.cpp +++ b/accessible/src/base/nsAccUtils.cpp @@ -321,8 +321,6 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes, PRBool nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom) { - NS_ASSERTION(aContent, "aContent is null in call to HasDefinedARIAToken!"); - if (!aContent->HasAttr(kNameSpaceID_None, aAtom) || aContent->AttrValueIs(kNameSpaceID_None, aAtom, nsAccessibilityAtoms::_empty, eCaseMatters) || diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 1f3f5d6fc12..cba149d21e7 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -2335,17 +2335,6 @@ nsAccessible::GetActionName(PRUint8 aIndex, nsAString& aName) case eSwitchAction: aName.AssignLiteral("switch"); return NS_OK; - - case eSortAction: - aName.AssignLiteral("sort"); - return NS_OK; - - case eExpandAction: - if (states & nsIAccessibleStates::STATE_COLLAPSED) - aName.AssignLiteral("expand"); - else - aName.AssignLiteral("collapse"); - return NS_OK; } return NS_ERROR_INVALID_ARG; @@ -3240,9 +3229,8 @@ nsAccessible::GetActionRule(PRUint32 aStates) if (aStates & nsIAccessibleStates::STATE_UNAVAILABLE) return eNoAction; - nsIContent* content = nsCoreUtils::GetRoleContent(mDOMNode); - // Check if it's simple xlink. + nsCOMPtr content(do_QueryInterface(mDOMNode)); if (nsCoreUtils::IsXLink(content)) return eJumpAction; @@ -3252,16 +3240,10 @@ nsAccessible::GetActionRule(PRUint32 aStates) if (isOnclick) return eClickAction; - - // Get an action based on ARIA role. - if (mRoleMapEntry && - mRoleMapEntry->actionRule != eNoAction) - return mRoleMapEntry->actionRule; - // Get an action based on ARIA attribute. - if (nsAccUtils::HasDefinedARIAToken(content, - nsAccessibilityAtoms::aria_expanded)) - return eExpandAction; + // Get an action based on ARIA role. + if (mRoleMapEntry) + return mRoleMapEntry->actionRule; return eNoAction; } diff --git a/accessible/tests/mochitest/Makefile.in b/accessible/tests/mochitest/Makefile.in index 692f3c047ca..f56efae4ecc 100644 --- a/accessible/tests/mochitest/Makefile.in +++ b/accessible/tests/mochitest/Makefile.in @@ -65,7 +65,6 @@ _TEST_FILES =\ role.js \ test_accessnode_invalidation.html \ test_actions_aria.html \ - test_actions_doc.html \ $(warning test_actions_inputs.html temporarily disabled) \ test_actions.xul \ test_aria_activedescendant.html \ diff --git a/accessible/tests/mochitest/test_actions_aria.html b/accessible/tests/mochitest/test_actions_aria.html index 558e2f36790..3d308d61873 100644 --- a/accessible/tests/mochitest/test_actions_aria.html +++ b/accessible/tests/mochitest/test_actions_aria.html @@ -99,21 +99,6 @@ ID: "treeitem", actionName: "activate", events: CLICK_EVENTS - }, - { - ID: "sortable", - actionName: "sort", - events: CLICK_EVENTS - }, - { - ID: "expandable", - actionName: "expand", - events: CLICK_EVENTS - }, - { - ID: "collapseable", - actionName: "collapse", - events: CLICK_EVENTS } ]; testActions(actionsArray); @@ -175,14 +160,5 @@
Treeitem
- -
-
- Columnheader -
-
- - -
expanded
diff --git a/accessible/tests/mochitest/test_actions_doc.html b/accessible/tests/mochitest/test_actions_doc.html deleted file mode 100644 index 04cccebe679..00000000000 --- a/accessible/tests/mochitest/test_actions_doc.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - nsIAccessible actions testing for document - - - - - - - - - - - - - - - - Mozilla Bug 473732 - -

- -
-  
- - - diff --git a/accessible/tests/mochitest/test_nsIAccessibleDocument.html b/accessible/tests/mochitest/test_nsIAccessibleDocument.html index 367b86923fd..50884ee0459 100644 --- a/accessible/tests/mochitest/test_nsIAccessibleDocument.html +++ b/accessible/tests/mochitest/test_nsIAccessibleDocument.html @@ -19,6 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=441737