mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1396626 - Expose aria-haspopup tokens dialog, listbox, menu and tree as object attributes. r=surkov
MozReview-Commit-ID: 7iuo89tuGOu --HG-- extra : rebase_source : 044da8a2ce31a6e894bb205bae6b86d6fce9976a
This commit is contained in:
parent
b1d45a9e89
commit
3e9bbd265b
@ -1215,7 +1215,7 @@ static const EStateRule sWAIUnivStateMap[] = {
|
||||
eARIACurrent,
|
||||
eARIADisabled,
|
||||
eARIAExpanded, // Currently under spec review but precedent exists
|
||||
eARIAHasPopup, // Note this is technically a "property"
|
||||
eARIAHasPopup, // Note this is a tokenised attribute starting in ARIA 1.1
|
||||
eARIAInvalid,
|
||||
eARIAModal,
|
||||
eARIARequired, // XXX not global, Bug 553117
|
||||
@ -1248,7 +1248,7 @@ static const AttrCharacteristics gWAIUnivAttrMap[] = {
|
||||
{&nsGkAtoms::aria_expanded, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
|
||||
{&nsGkAtoms::aria_flowto, ATTR_BYPASSOBJ | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_grabbed, ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ_IF_FALSE | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_hidden, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL }, /* handled special way */
|
||||
{&nsGkAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_label, ATTR_BYPASSOBJ | ATTR_GLOBAL },
|
||||
|
@ -956,10 +956,6 @@ Accessible::Attributes()
|
||||
NS_LITERAL_STRING("true"));
|
||||
}
|
||||
|
||||
// XXX: In ARIA 1.1, the value of aria-haspopup became a token (bug 1355449).
|
||||
if (aria::UniversalStatesFor(mContent->AsElement()) & states::HASPOPUP)
|
||||
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::haspopup, NS_LITERAL_STRING("true"));
|
||||
|
||||
// If there is no aria-live attribute then expose default value of 'live'
|
||||
// object attribute used for ARIA role of this accessible.
|
||||
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
|
||||
|
@ -40,6 +40,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
||||
testAttrs("haspopupTrue", { "haspopup": "true" }, true);
|
||||
testAbsentAttrs("haspopupFalse", { "haspopup": "false" });
|
||||
testAbsentAttrs("haspopupEmpty", { "haspopup": "" });
|
||||
testAttrs("haspopupDialog", { "haspopup": "dialog" }, true);
|
||||
testAttrs("haspopupListbox", { "haspopup": "listbox" }, true);
|
||||
testAttrs("haspopupMenu", { "haspopup": "menu" }, true);
|
||||
testAttrs("haspopupTree", { "haspopup": "tree" }, true);
|
||||
testAttrs("hidden", {"hidden": "true"}, true);
|
||||
testAbsentAttrs("hidden_false", { "hidden": "false" });
|
||||
testAbsentAttrs("modal", {"modal": "true"});
|
||||
@ -218,6 +222,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
||||
<div id="haspopupTrue" aria-haspopup="true"></div>
|
||||
<div id="haspopupFalse" aria-haspopup="false"></div>
|
||||
<div id="haspopupEmpty" aria-haspopup=""></div>
|
||||
<div id="haspopupDialog" aria-haspopup="dialog"></div>
|
||||
<div id="haspopupListbox" aria-haspopup="listbox"></div>
|
||||
<div id="haspopupMenu" aria-haspopup="menu"></div>
|
||||
<div id="haspopupTree" aria-haspopup="tree"></div>
|
||||
<div id="hidden" aria-hidden="true"></div>
|
||||
<div id="hidden_false" aria-hidden="false"></div>
|
||||
<div id="modal" aria-modal="true"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user