зеркало из https://github.com/mozilla/pjs.git
Bug 463645 - container-live object attribute should reflect role as well, r=davidb, marcoz
This commit is contained in:
Родитель
d2fd6aefa6
Коммит
765cfda175
|
@ -65,6 +65,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_ALERT,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -73,6 +74,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_DIALOG,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -81,6 +83,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_APPLICATION,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -97,6 +100,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PUSHBUTTON,
|
||||
eNoValue,
|
||||
eClickAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_pressed, kBoolState, nsIAccessibleStates::STATE_PRESSED},
|
||||
{&nsAccessibilityAtoms::aria_pressed, "mixed", nsIAccessibleStates::STATE_MIXED},
|
||||
|
@ -107,6 +111,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_CHECKBUTTON,
|
||||
eNoValue,
|
||||
eCheckUncheckAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_CHECKABLE,
|
||||
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED},
|
||||
{&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED},
|
||||
|
@ -118,6 +123,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_COLUMNHEADER,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -129,6 +135,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_COMBOBOX,
|
||||
eHasValueMinMax,
|
||||
eOpenCloseAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_COLLAPSED | nsIAccessibleStates::STATE_HASPOPUP,
|
||||
// Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aria-autocomplete
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
|
@ -139,6 +146,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_DIALOG,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -155,6 +163,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_TABLE,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_FOCUSABLE,
|
||||
{&nsAccessibilityAtoms::aria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
|
@ -165,6 +174,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_GRID_CELL,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -176,6 +186,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_GROUPING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -184,6 +195,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_HEADING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -192,6 +204,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_GRAPHIC,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -200,6 +213,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_LABEL,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -208,6 +222,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_LINK,
|
||||
eNoValue,
|
||||
eJumpAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_LINKED,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -216,6 +231,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_LIST,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_READONLY,
|
||||
{&nsAccessibilityAtoms::aria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
||||
kEndEntry
|
||||
|
@ -225,6 +241,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_LISTBOX,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
{&nsAccessibilityAtoms::aria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
||||
|
@ -235,6 +252,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_LISTITEM,
|
||||
eNoValue,
|
||||
eNoAction, // XXX: should depend on state, parent accessible
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_READONLY,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -243,11 +261,30 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
{&nsAccessibilityAtoms::aria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE},
|
||||
kEndEntry
|
||||
},
|
||||
{
|
||||
"log",
|
||||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
ePoliteLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
{
|
||||
"marquee",
|
||||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eOffLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
{
|
||||
"math",
|
||||
nsIAccessibleRole::ROLE_FLAT_EQUATION,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -257,6 +294,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
eNoValue,
|
||||
eNoAction, // XXX: technically accessibles of menupopup role haven't
|
||||
// any action, but menu can be open or close.
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -265,6 +303,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_MENUBAR,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -273,6 +312,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_MENUITEM,
|
||||
eNoValue,
|
||||
eClickAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
|
||||
{&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
|
||||
|
@ -284,6 +324,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_CHECK_MENU_ITEM,
|
||||
eNoValue,
|
||||
eClickAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_CHECKABLE,
|
||||
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED },
|
||||
{&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED},
|
||||
|
@ -294,6 +335,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_RADIO_MENU_ITEM,
|
||||
eNoValue,
|
||||
eClickAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_CHECKABLE,
|
||||
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED },
|
||||
kEndEntry
|
||||
|
@ -303,6 +345,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_OPTION,
|
||||
eNoValue,
|
||||
eSelectAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -316,6 +359,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -324,6 +368,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PROGRESSBAR,
|
||||
eHasValueMinMax,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
nsIAccessibleStates::STATE_READONLY,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -332,6 +377,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_RADIOBUTTON,
|
||||
eNoValue,
|
||||
eSelectAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED},
|
||||
kEndEntry
|
||||
|
@ -341,6 +387,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_GROUPING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -349,6 +396,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PANE,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -357,6 +405,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_ROW,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -367,6 +416,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_ROWHEADER,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -378,6 +428,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_SECTION,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -386,6 +437,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_SEPARATOR,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -394,6 +446,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_SLIDER,
|
||||
eHasValueMinMax,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
kEndEntry
|
||||
|
@ -403,6 +456,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_SPINBUTTON,
|
||||
eHasValueMinMax,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
kEndEntry
|
||||
|
@ -412,6 +466,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_STATUSBAR,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -420,6 +475,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PAGETAB,
|
||||
eNoValue,
|
||||
eSwitchAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -428,6 +484,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PAGETABLIST,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
ePoliteLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -436,6 +493,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_PROPERTYPAGE,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -444,6 +502,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_ENTRY,
|
||||
eNoValue,
|
||||
eActivateAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
// Manually map EXT_STATE_SINGLE_LINE and EXT_STATE_MULTI_LINE FROM aria-multiline
|
||||
// Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aria-autocomplete
|
||||
|
@ -452,11 +511,21 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
kEndEntry
|
||||
},
|
||||
{
|
||||
"timer",
|
||||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eOffLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
{
|
||||
"toolbar",
|
||||
nsIAccessibleRole::ROLE_TOOLBAR,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -465,6 +534,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_TOOLTIP,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
},
|
||||
|
@ -473,6 +543,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_OUTLINE,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
{&nsAccessibilityAtoms::aria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
||||
|
@ -483,6 +554,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
nsIAccessibleRole::ROLE_TREE_TABLE,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
||||
{&nsAccessibilityAtoms::aria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
||||
|
@ -494,6 +566,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
eNoValue,
|
||||
eActivateAction, // XXX: should expose second 'expand/collapse' action based
|
||||
// on states
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
{&nsAccessibilityAtoms::aria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -510,6 +583,7 @@ nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = {
|
|||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
};
|
||||
|
@ -519,6 +593,7 @@ nsRoleMapEntry nsARIAMap::gEmptyRoleMap = {
|
|||
nsIAccessibleRole::ROLE_NOTHING,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
kEndEntry
|
||||
};
|
||||
|
|
|
@ -63,6 +63,13 @@ enum EActionRule
|
|||
eSwitchAction
|
||||
};
|
||||
|
||||
enum ELiveAttrRule
|
||||
{
|
||||
eNoLiveAttr,
|
||||
eOffLiveAttr,
|
||||
ePoliteLiveAttr
|
||||
};
|
||||
|
||||
// ARIA attribute characteristic masks, grow as needed
|
||||
|
||||
/**
|
||||
|
@ -115,6 +122,10 @@ struct nsRoleMapEntry
|
|||
// Action mapping rule, how to expose nsIAccessible action
|
||||
EActionRule actionRule;
|
||||
|
||||
// 'live' and 'container-live' object attributes mapping rule: how to expose
|
||||
// these object attributes if ARIA 'live' attribute is missed.
|
||||
ELiveAttrRule liveAttRule;
|
||||
|
||||
// Automatic state mapping rule: always include in nsIAccessibleStates
|
||||
PRUint32 state; // or kNoReqStates if no nsIAccessibleStates are automatic for this role.
|
||||
|
||||
|
|
|
@ -272,21 +272,38 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
|
|||
nsAutoString atomic, live, relevant, busy;
|
||||
nsIContent *ancestor = aStartContent;
|
||||
while (ancestor) {
|
||||
|
||||
// container-relevant attribute
|
||||
if (relevant.IsEmpty() &&
|
||||
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_relevant) &&
|
||||
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_relevant, relevant))
|
||||
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerRelevant, relevant);
|
||||
|
||||
if (live.IsEmpty() &&
|
||||
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_live) &&
|
||||
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live, live))
|
||||
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live);
|
||||
// container-live attribute
|
||||
if (live.IsEmpty()) {
|
||||
if (nsAccUtils::HasDefinedARIAToken(ancestor,
|
||||
nsAccessibilityAtoms::aria_live)) {
|
||||
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live,
|
||||
live);
|
||||
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live);
|
||||
} else {
|
||||
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(ancestor));
|
||||
nsRoleMapEntry *role = GetRoleMapEntry(node);
|
||||
if (role) {
|
||||
nsAutoString live;
|
||||
GetLiveAttrValue(role->liveAttRule, live);
|
||||
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// container-atomic attribute
|
||||
if (atomic.IsEmpty() &&
|
||||
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_atomic) &&
|
||||
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_atomic, atomic))
|
||||
SetAccAttr(aAttributes, nsAccessibilityAtoms::containerAtomic, atomic);
|
||||
|
||||
// container-busy attribute
|
||||
if (busy.IsEmpty() &&
|
||||
nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_busy) &&
|
||||
ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_busy, busy))
|
||||
|
@ -669,6 +686,18 @@ nsAccUtils::GetAttributeCharacteristics(nsIAtom* aAtom)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
nsAccUtils::GetLiveAttrValue(PRUint32 aRule, nsAString& aValue)
|
||||
{
|
||||
switch (aRule) {
|
||||
case eOffLiveAttr:
|
||||
aValue = NS_LITERAL_STRING("off");
|
||||
break;
|
||||
case ePoliteLiveAttr:
|
||||
aValue = NS_LITERAL_STRING("polite");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_A11Y
|
||||
|
||||
|
|
|
@ -270,6 +270,12 @@ public:
|
|||
*/
|
||||
static PRUint8 GetAttributeCharacteristics(nsIAtom* aAtom);
|
||||
|
||||
/**
|
||||
* Return the 'live' or 'container-live' object attribute value from the given
|
||||
* ELiveAttrRule constant.
|
||||
*/
|
||||
static void GetLiveAttrValue(PRUint32 aRule, nsAString& aValue);
|
||||
|
||||
/**
|
||||
* Query nsAccessNode from the given nsIAccessible.
|
||||
*/
|
||||
|
|
|
@ -256,6 +256,7 @@ ACCESSIBILITY_ATOM(containerBusy, "container-busy")
|
|||
ACCESSIBILITY_ATOM(containerLive, "container-live")
|
||||
ACCESSIBILITY_ATOM(containerRelevant, "container-relevant")
|
||||
ACCESSIBILITY_ATOM(level, "level")
|
||||
ACCESSIBILITY_ATOM(live, "live")
|
||||
ACCESSIBILITY_ATOM(lineNumber, "line-number")
|
||||
ACCESSIBILITY_ATOM(posinset, "posinset")
|
||||
ACCESSIBILITY_ATOM(setsize, "setsize")
|
||||
|
|
|
@ -1925,8 +1925,9 @@ NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aRole)
|
|||
|
||||
// gLandmarkRoleMap: can use role of accessible class impl
|
||||
// gEmptyRoleMap and all others: cannot use role of accessible class impl
|
||||
if (mRoleMapEntry != &nsARIAMap::gLandmarkRoleMap) {
|
||||
// We can now expose ROLE_NOTHING when there is a role map entry, which
|
||||
if (mRoleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING) {
|
||||
// We can now expose ROLE_NOTHING when there is a role map entry or used
|
||||
// role is nothing, which
|
||||
// will cause ATK to use ROLE_UNKNOWN and MSAA to use a BSTR role with
|
||||
// the ARIA role or element's tag. In either case the AT can also use
|
||||
// the object attributes tag and xml-roles to find out more.
|
||||
|
@ -2012,7 +2013,7 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// Expose all ARIA attributes
|
||||
// Expose object attributes from ARIA attributes.
|
||||
PRUint32 numAttrs = content->GetAttrCount();
|
||||
for (PRUint32 count = 0; count < numAttrs; count ++) {
|
||||
const nsAttrName *attr = content->GetAttrNameAt(count);
|
||||
|
@ -2035,6 +2036,17 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
|
|||
}
|
||||
}
|
||||
|
||||
// If there is no aria-live attribute then expose default value of 'live'
|
||||
// object attribute used for ARIA role of this accessible.
|
||||
if (mRoleMapEntry) {
|
||||
nsAutoString live;
|
||||
nsAccUtils::GetAccAttr(attributes, nsAccessibilityAtoms::live, live);
|
||||
if (live.IsEmpty()) {
|
||||
nsAccUtils::GetLiveAttrValue(mRoleMapEntry->liveAttRule, live);
|
||||
nsAccUtils::SetAccAttr(attributes, nsAccessibilityAtoms::live, live);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,24 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=475006
|
|||
testAttrs("atomic", {"atomic" : "true"}, true);
|
||||
testAttrs("autocomplete", {"autocomplete" : "true"}, true);
|
||||
// bug 477876 testAttrs("checked", {"checkable" : "true"}, true);
|
||||
testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
|
||||
testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
|
||||
|
||||
// live object attribute
|
||||
testAttrs("live", {"live" : "polite"}, true);
|
||||
testAttrs("me", {"container-live" : "polite"}, true);
|
||||
|
||||
testAttrs("live2", {"live" : "polite"}, true);
|
||||
testAttrs("log", {"live" : "polite"}, true);
|
||||
testAttrs("marquee", {"live" : "off"}, true);
|
||||
testAttrs("status", {"live" : "polite"}, true);
|
||||
testAttrs("timer", {"live" : "off"}, true);
|
||||
|
||||
// container-live object attribute
|
||||
testAttrs("liveChild", {"container-live" : "polite"}, true);
|
||||
testAttrs("live2Child", {"container-live" : "polite"}, true);
|
||||
testAttrs("logChild", {"container-live" : "polite"}, true);
|
||||
testAttrs("marqueeChild", {"container-live" : "off"}, true);
|
||||
testAttrs("statusChild", {"container-live" : "polite"}, true);
|
||||
testAttrs("timerChild", {"container-live" : "off"}, true);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -50,7 +64,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=475006
|
|||
<div id="autocomplete" role="textbox" aria-autocomplete="true"></div>
|
||||
<div id="checked" aria-checked="true"></div>
|
||||
<div id="dropeffect" aria-dropeffect="copy"></div>
|
||||
<div id="live" aria-live="polite">excuse <div id="me">me</div></div>
|
||||
|
||||
<div id="live" aria-live="polite">excuse <div id="liveChild">me</div></div>
|
||||
<div id="live2" role="marquee" aria-live="polite">excuse <div id="live2Child">me</div></div>
|
||||
<div id="log" role="log">excuse <div id="logChild">me</div></div>
|
||||
<div id="marquee" role="marquee">excuse <div id="marqueeChild">me</div></div>
|
||||
<div id="status" role="status">excuse <div id="statusChild">me</div></div>
|
||||
<div id="timer" role="timer">excuse <div id="timerChild">me</div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче