bug 474294 - Support aria-expanded on more roles, r=aaronlev, r=MarcoZ
authorDavid Bolter <dbolter@mozilla.com>
Mon, 19 Jan 2009 22:28:03 +0100
changeset 23957 fae62c15f9a0892c77274ec2a4f22a775ab468ad
parent 23956 1e72b268d05eb8cc0633a67390dc53e494c21035
child 23958 8046c64edb0675085393ce77044f50fccf0bb9e5
push id4806
push usermzehe@mozilla.com
push dateMon, 19 Jan 2009 21:28:19 +0000
treeherdermozilla-central@fae62c15f9a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaaronlev, MarcoZ
bugs474294
milestone1.9.2a1pre
bug 474294 - Support aria-expanded on more roles, r=aaronlev, r=MarcoZ
accessible/src/base/nsARIAMap.cpp
--- a/accessible/src/base/nsARIAMap.cpp
+++ b/accessible/src/base/nsARIAMap.cpp
@@ -127,17 +127,16 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] 
   {
     "combobox",
     nsIAccessibleRole::ROLE_COMBOBOX,
     eHasValueMinMax,
     eOpenCloseAction,
     nsIAccessibleStates::STATE_COLLAPSED | nsIAccessibleStates::STATE_HASPOPUP,
     // Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aria-autocomplete
     {&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
-    {&nsAccessibilityAtoms::aria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
     kEndEntry
   },
   {
     "description",
     nsIAccessibleRole::ROLE_TEXT_CONTAINER,
     eNoValue,
     eNoAction,
     kNoReqStates,
@@ -170,18 +169,16 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] 
     kEndEntry
   },
   {
     "gridcell",
     nsIAccessibleRole::ROLE_CELL,
     eNoValue,
     eNoAction,
     kNoReqStates,
-    {&nsAccessibilityAtoms::aria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
-    {&nsAccessibilityAtoms::aria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
     {&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
     {&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
     {&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
     kEndEntry
   },
   {
     "group",
     nsIAccessibleRole::ROLE_GROUPING,
@@ -366,18 +363,16 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] 
   {
     "row",
     nsIAccessibleRole::ROLE_ROW,
     eNoValue,
     eNoAction,
     kNoReqStates,
     {&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
     {&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
-    {&nsAccessibilityAtoms::aria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
-    {&nsAccessibilityAtoms::aria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
     kEndEntry
   },
   {
     "rowheader",
     nsIAccessibleRole::ROLE_ROWHEADER,
     eNoValue,
     eNoAction,
     kNoReqStates,
@@ -505,18 +500,16 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] 
     "treeitem",
     nsIAccessibleRole::ROLE_OUTLINEITEM,
     eNoValue,
     eActivateAction, // XXX: should expose second 'expand/collapse' action based
                      // on states
     kNoReqStates,
     {&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
     {&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
-    {&nsAccessibilityAtoms::aria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
-    {&nsAccessibilityAtoms::aria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
     {&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
     {&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
     {&nsAccessibilityAtoms::aria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE},
   },
 };
 
 PRUint32 nsARIAMap::gWAIRoleMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIRoleMap);
 
@@ -545,11 +538,13 @@ nsRoleMapEntry nsARIAMap::gEmptyRoleMap 
  */
 nsStateMapEntry nsARIAMap::gWAIUnivStateMap[] = {
   {&nsAccessibilityAtoms::aria_required, kBoolState, nsIAccessibleStates::STATE_REQUIRED},
   {&nsAccessibilityAtoms::aria_invalid,  kBoolState, nsIAccessibleStates::STATE_INVALID},
   {&nsAccessibilityAtoms::aria_haspopup, kBoolState, nsIAccessibleStates::STATE_HASPOPUP},
   {&nsAccessibilityAtoms::aria_busy,     "true",     nsIAccessibleStates::STATE_BUSY},
   {&nsAccessibilityAtoms::aria_busy,     "error",    nsIAccessibleStates::STATE_INVALID},
   {&nsAccessibilityAtoms::aria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
+  {&nsAccessibilityAtoms::aria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
+  {&nsAccessibilityAtoms::aria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
   kEndEntry
 };