mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 532338 - Inappropriate IAccessible2 role for DL and DT tags. r=MarcoZ,surkov
This commit is contained in:
parent
0ccee0c61c
commit
bc0724e79d
@ -555,7 +555,8 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame *aFrame,
|
||||
else if (tag == nsAccessibilityAtoms::optgroup) {
|
||||
*aAccessible = new nsHTMLSelectOptGroupAccessible(aNode, aWeakShell);
|
||||
}
|
||||
else if (tag == nsAccessibilityAtoms::ul || tag == nsAccessibilityAtoms::ol) {
|
||||
else if (tag == nsAccessibilityAtoms::ul || tag == nsAccessibilityAtoms::ol ||
|
||||
tag == nsAccessibilityAtoms::dl) {
|
||||
*aAccessible = new nsHTMLListAccessible(aNode, aWeakShell);
|
||||
}
|
||||
else if (tag == nsAccessibilityAtoms::a) {
|
||||
@ -570,17 +571,18 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame *aFrame,
|
||||
|
||||
*aAccessible = new nsHTMLLinkAccessible(aNode, aWeakShell);
|
||||
}
|
||||
else if (tag == nsAccessibilityAtoms::li && aFrame->GetType() != nsAccessibilityAtoms::blockFrame) {
|
||||
// Normally this is created by the list item frame which knows about the bullet frame
|
||||
// However, in this case the list item must have been styled using display: foo
|
||||
else if (tag == nsAccessibilityAtoms::dt ||
|
||||
(tag == nsAccessibilityAtoms::li &&
|
||||
aFrame->GetType() != nsAccessibilityAtoms::blockFrame)) {
|
||||
// Normally for li, it is created by the list item frame (in nsBlockFrame)
|
||||
// which knows about the bullet frame; however, in this case the list item
|
||||
// must have been styled using display: foo
|
||||
*aAccessible = new nsHTMLLIAccessible(aNode, aWeakShell, EmptyString());
|
||||
}
|
||||
else if (tag == nsAccessibilityAtoms::abbr ||
|
||||
tag == nsAccessibilityAtoms::acronym ||
|
||||
tag == nsAccessibilityAtoms::blockquote ||
|
||||
tag == nsAccessibilityAtoms::dd ||
|
||||
tag == nsAccessibilityAtoms::dl ||
|
||||
tag == nsAccessibilityAtoms::dt ||
|
||||
tag == nsAccessibilityAtoms::form ||
|
||||
tag == nsAccessibilityAtoms::h1 ||
|
||||
tag == nsAccessibilityAtoms::h2 ||
|
||||
|
@ -46,6 +46,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=472326
|
||||
// get broken.
|
||||
testRole("p", ROLE_PARAGRAPH);
|
||||
|
||||
// Test dl, dt, dd
|
||||
testRole("definitionlist", ROLE_LIST);
|
||||
testRole("definitionterm", ROLE_LISTITEM);
|
||||
testRole("definitiondescription", ROLE_PARAGRAPH);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
@ -79,5 +84,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=472326
|
||||
<h4 id="head4">A heading level 4</h4>
|
||||
<h5 id="head5">A heading level 5</h5>
|
||||
<h6 id="head6">A heading level 6</h6>
|
||||
|
||||
<dl id="definitionlist">
|
||||
<dt id="definitionterm">gecko</dt>
|
||||
<dd id="definitiondescription">geckos have sticky toes</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user