зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1732306 - Part 4: Implement generic role mapping, r=Jamie
This revision 'implements' the 'generic' ARIA role mapping by mapping ARIA 'generic' to Gecko 'section.' This isn't a full implementation of 'generic' - it sidesteps it to avoid dealing with larger 'generic' issues (namely: that there are multiple roles that are 'generic' in Gecko currently). We'll sort that out in a later commit. Differential Revision: https://phabricator.services.mozilla.com/D200133
This commit is contained in:
Родитель
f01fa3c6d9
Коммит
970d32d957
|
@ -690,6 +690,16 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
|
|||
eLandmark,
|
||||
kNoReqStates
|
||||
},
|
||||
{ // generic
|
||||
nsGkAtoms::generic,
|
||||
roles::SECTION,
|
||||
kUseMapRole,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kGenericAccType,
|
||||
kNoReqStates
|
||||
},
|
||||
{ // graphics-document
|
||||
nsGkAtoms::graphicsDocument,
|
||||
roles::NON_NATIVE_DOCUMENT,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Generic Role Verification Tests</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/wai-aria/scripts/aria-utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Tests <a href="https://w3c.github.io/aria/#generic">generic</a>.</p>
|
||||
|
||||
<p role="generic" data-testname="generic role on p element is generic" class="ex-generic">x</p>
|
||||
|
||||
<script>
|
||||
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче