Backed out changeset c216b1ee565e (bug 1392926) for failing a11y's accessible/tests/mochitest/attributes/test_xml-roles.html and accessible/tests/mochitest/jsat/test_traversal_helper.html. r=backout

This commit is contained in:
Sebastian Hengst 2017-08-25 17:04:47 +02:00
parent 0f2181d932
commit 4acdd37bd2
3 changed files with 4 additions and 20 deletions

View File

@ -318,7 +318,8 @@ MARKUPMAP(q,
MARKUPMAP(section,
New_HyperText,
roles::SECTION)
roles::SECTION,
Attr(xmlroles, region))
MARKUPMAP(summary,
New_HTMLSummary,

View File

@ -1175,13 +1175,6 @@ HyperTextAccessible::LandmarkRole() const
return nsGkAtoms::main;
}
// Only return xml-roles "region" if the section has an accessible name.
if (mContent->IsHTMLElement(nsGkAtoms::section)) {
nsAutoString name;
const_cast<HyperTextAccessible*>(this)->Name(name);
return name.IsEmpty() ? nullptr : nsGkAtoms::region;
}
return nullptr;
}

View File

@ -1156,23 +1156,14 @@
testElm("samp_container", obj);
// ////////////////////////////////////////////////////////////////////////
// HTML:section without an accessible name
obj = {
role: ROLE_SECTION,
absentAttributes: { "xml-roles": "region" },
interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ]
};
testElm("section", obj);
// HTML:section with an accessible name
// HTML:section
obj = {
role: ROLE_SECTION,
attributes: { "xml-roles": "region" },
interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ]
};
testElm("named_section", obj);
testElm("section", obj);
// ////////////////////////////////////////////////////////////////////////
// HTML:small contained by paragraph
@ -1657,7 +1648,6 @@
<p id="s_container">normal<s>striked</s></p>
<p id="samp_container">normal<samp>sample</samp></p>
<section id="section">section</section>
<section id="named_section" aria-label="foo">named section</section>
<p id="small_container">normal<small>small</small></p>
<span id="span"></span>
<p id="strong_container">normal<strong>strong</strong></p>