Bug 1044431 - Listbox owned by combobox has the wrong role, r=MarcoZ

This commit is contained in:
Athena 2014-10-30 16:05:26 +01:00
Родитель aa11bb0a90
Коммит 97197969ad
2 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -1376,7 +1376,8 @@ Accessible::ARIATransformRole(role aRole)
// mapping to menu.
if (mParent && mParent->Role() == roles::COMBOBOX) {
return roles::COMBOBOX_LIST;
} else {
// Listbox is owned by a combobox
Relation rel = RelationByType(RelationType::NODE_CHILD_OF);
Accessible* targetAcc = nullptr;
while ((targetAcc = rel.Next()))

Просмотреть файл

@ -71,6 +71,10 @@
testRole("span2", ROLE_TEXT_CONTAINER);
testRole("span3", ROLE_TEXT_CONTAINER);
// Test role of listbox inside combobox
testRole("listbox1", ROLE_COMBOBOX_LIST);
testRole("listbox2", ROLE_COMBOBOX_LIST);
SimpleTest.finish();
}
@ -118,6 +122,11 @@
title="Map ARIA role FORM">
Bug 734982
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1044431"
title="Listbox owned by combobox has the wrong role">
Mozilla Bug 1044431
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
@ -167,5 +176,11 @@
<span id="span1" onclick="">clickable span</span>
<span id="span2" onmousedown="">clickable span</span>
<span id="span3" onmouseup="">clickable span</span>
<div id="combobox1" role="combobox">
<div id="listbox1" role="listbox"></div>
</div>
<div id="combobox2" role="combobox" aria-owns="listbox2"></div>
<div id="listbox2" role="listbox"></div>
</body>
</html>