зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1818404: Use HTMLLinkAccessible for SVG <a> elements. r=nlapre
This ensures that these are HyperTextAccessibles if they contain text, which prevents assertions and exposes formatting information. It also gives these the correct role. Differential Revision: https://phabricator.services.mozilla.com/D179409
This commit is contained in:
Родитель
6a9d344564
Коммит
09d623679d
|
@ -1347,6 +1347,8 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
// <g> can also contain <foreignObject>.
|
||||
newAcc =
|
||||
new EnumRoleHyperTextAccessible<roles::GROUPING>(content, document);
|
||||
} else if (content->IsSVGElement(nsGkAtoms::a)) {
|
||||
newAcc = new HTMLLinkAccessible(content, document);
|
||||
}
|
||||
|
||||
} else if (content->IsMathMLElement()) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
testRole("path", ROLE_GRAPHIC);
|
||||
testRole("image", ROLE_GRAPHIC);
|
||||
testRole("image2", ROLE_GRAPHIC);
|
||||
testRole("a", ROLE_LINK);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
@ -85,6 +86,7 @@
|
|||
</image>
|
||||
<image x1="25" y1="110" width="50" height="20" id="image2"
|
||||
xlink:href="../moz.png" aria-label="hello"/>
|
||||
<a href="#" id="a"><text>a</text></a>
|
||||
</svg>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
const g = getNode("g");
|
||||
testTextAttrs(g, 0, {}, defAttrs, 0, 2);
|
||||
|
||||
const a = getNode("a");
|
||||
const aDefAttrs = buildDefaultTextAttrs(a, "10pt");
|
||||
testTextAttrs(a, 0, {}, aDefAttrs, 0, 1);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -41,6 +45,7 @@
|
|||
<title>g</title>
|
||||
<foreignobject>f2</foreignobject>
|
||||
</g>
|
||||
<text><a href="#" id="a">a</a></text>
|
||||
</svg>
|
||||
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче