зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1865582: Include xlink:title in svg link name computation, r=Jamie
This revision implements HTMLLinkAccessible::NativeName, which, if the element is present in an SVG context, checks the xlink:title attribute for the name, as required by the accessible name specification. This revision also removes eight expected failures from the relevant web platform test meta file. Differential Revision: https://phabricator.services.mozilla.com/D203031
This commit is contained in:
Родитель
52945e7e84
Коммит
ff4c89901f
|
@ -112,6 +112,17 @@ void HTMLLinkAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
}
|
||||
}
|
||||
|
||||
ENameValueFlag HTMLLinkAccessible::NativeName(nsString& aName) const {
|
||||
if (mContent->IsSVGElement()) {
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_XLink, nsGkAtoms::title, aName);
|
||||
if (!aName.IsEmpty()) {
|
||||
return eNameOK;
|
||||
}
|
||||
}
|
||||
|
||||
return HyperTextAccessible::NativeName(aName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HyperLinkAccessible
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ class HTMLLinkAccessible : public HyperTextAccessible {
|
|||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) override;
|
||||
|
||||
virtual ENameValueFlag NativeName(nsString& aName) const override;
|
||||
|
||||
enum { eAction_Jump = 0 };
|
||||
};
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
[comp_host_language_label.html]
|
||||
[[xlink:title\][href\] > circle]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][href\] > rect]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][href\] > polygon]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][href\] > g]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][xlink:href\] > circle]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][xlink:href\] > rect]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][xlink:href\] > polygon]
|
||||
expected: FAIL
|
||||
|
||||
[[xlink:title\][xlink:href\] > g]
|
||||
expected: FAIL
|
Загрузка…
Ссылка в новой задаче