зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1608965 Part 2 - Add ARIA suggestion role, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D64546 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
02b10b3195
Коммит
93ff1614a5
|
@ -617,6 +617,9 @@ AtkRole getRoleCB(AtkObject* aAtkObj) {
|
|||
aAtkObj->role = ATK_ROLE_SECTION;
|
||||
else if (aAtkObj->role == ATK_ROLE_MARK && !IsAtkVersionAtLeast(2, 36)) {
|
||||
aAtkObj->role = ATK_ROLE_TEXT;
|
||||
} else if (aAtkObj->role == ATK_ROLE_SUGGESTION &&
|
||||
!IsAtkVersionAtLeast(2, 36)) {
|
||||
aAtkObj->role = ATK_ROLE_SECTION;
|
||||
}
|
||||
|
||||
return aAtkObj->role;
|
||||
|
|
|
@ -1117,6 +1117,15 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
|
|||
kGenericAccType,
|
||||
kNoReqStates
|
||||
},
|
||||
{ // suggestion
|
||||
nsGkAtoms::suggestion,
|
||||
roles::SUGGESTION,
|
||||
kUseMapRole,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kGenericAccType,
|
||||
},
|
||||
{ // switch
|
||||
nsGkAtoms::svgSwitch,
|
||||
roles::SWITCH,
|
||||
|
|
|
@ -1051,7 +1051,12 @@ enum Role {
|
|||
*/
|
||||
MARK = 179,
|
||||
|
||||
LAST_ROLE = MARK
|
||||
/**
|
||||
* The WAI-ARIA suggestion role.
|
||||
*/
|
||||
SUGGESTION = 180,
|
||||
|
||||
LAST_ROLE = SUGGESTION
|
||||
};
|
||||
|
||||
} // namespace roles
|
||||
|
|
|
@ -1639,4 +1639,13 @@ ROLE(MARK,
|
|||
IA2_ROLE_MARK,
|
||||
java::SessionAccessibility::CLASSNAME_VIEW,
|
||||
eNameFromSubtreeIfReqRule)
|
||||
|
||||
ROLE(SUGGESTION,
|
||||
"suggestion",
|
||||
ATK_ROLE_SUGGESTION,
|
||||
NSAccessibilityGroupRole,
|
||||
USE_ROLE_STRING,
|
||||
IA2_ROLE_SUGGESTION,
|
||||
java::SessionAccessibility::CLASSNAME_VIEW,
|
||||
eNoNameRule)
|
||||
// clang-format on
|
||||
|
|
|
@ -1045,4 +1045,9 @@ interface nsIAccessibleRole : nsISupports
|
|||
*/
|
||||
const unsigned long ROLE_MARK = 179;
|
||||
|
||||
/**
|
||||
* The WAI-ARIA suggestion role.
|
||||
*/
|
||||
const unsigned long ROLE_SUGGESTION = 180;
|
||||
|
||||
};
|
||||
|
|
|
@ -121,6 +121,7 @@ const ROLE_SLIDER = nsIAccessibleRole.ROLE_SLIDER;
|
|||
const ROLE_SPINBUTTON = nsIAccessibleRole.ROLE_SPINBUTTON;
|
||||
const ROLE_STATICTEXT = nsIAccessibleRole.ROLE_STATICTEXT;
|
||||
const ROLE_STATUSBAR = nsIAccessibleRole.ROLE_STATUSBAR;
|
||||
const ROLE_SUGGESTION = nsIAccessibleRole.ROLE_SUGGESTION;
|
||||
const ROLE_SUMMARY = nsIAccessibleRole.ROLE_SUMMARY;
|
||||
const ROLE_SWITCH = nsIAccessibleRole.ROLE_SWITCH;
|
||||
const ROLE_TABLE = nsIAccessibleRole.ROLE_TABLE;
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
testRole("aria_slider", ROLE_SLIDER);
|
||||
testRole("aria_spinbutton", ROLE_SPINBUTTON);
|
||||
testRole("aria_status", ROLE_STATUSBAR);
|
||||
testRole("aria_suggestion", ROLE_SUGGESTION);
|
||||
testRole("aria_switch", ROLE_SWITCH);
|
||||
testRole("aria_tab", ROLE_PAGETAB);
|
||||
testRole("aria_tablist", ROLE_PAGETABLIST);
|
||||
|
@ -294,6 +295,7 @@
|
|||
<span id="aria_slider" role="slider"></span>
|
||||
<span id="aria_spinbutton" role="spinbutton"></span>
|
||||
<span id="aria_status" role="status"></span>
|
||||
<span id="aria_suggestion" role="suggestion"></span>
|
||||
<span id="aria_switch" role="switch"></span>
|
||||
<span id="aria_tab" role="tab"></span>
|
||||
<span id="aria_tablist" role="tablist"></span>
|
||||
|
|
|
@ -1149,6 +1149,7 @@ STATIC_ATOMS = [
|
|||
Atom("substringAfter", "substring-after"),
|
||||
Atom("substringBefore", "substring-before"),
|
||||
Atom("sub", "sub"),
|
||||
Atom("suggestion", "suggestion"),
|
||||
Atom("sum", "sum"),
|
||||
Atom("sup", "sup"),
|
||||
Atom("summary", "summary"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче