Bug 1248415 - Improve screen reader accessibility of various Preference panes groupbox labeling, r=surkov

--HG--
extra : rebase_source : c7942e48cc199f5c38d4da08a2b688e1072550e3
This commit is contained in:
Marco Zehe 2016-05-18 07:10:49 +02:00
Родитель 2efe839ca3
Коммит 6d3d2e75ef
2 изменённых файлов: 17 добавлений и 2 удалений

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

@ -45,7 +45,7 @@
// Trick cases. Self and recursive referencing.
testName("rememberHistoryDays", "Remember 3 days");
testName("historyDays", "Remember 3 days");
testName("rememberAfter", null); // XUL labels doesn't allow name from subtree
testName("rememberAfter", "days");
// Anonymous content (see name.xbl#third)
var anonBtn = getAccessible("labelledby_box_anon").lastChild;
@ -173,6 +173,11 @@
// Name from aria-labelledby: menuitem label+ listitem label
testName("li_labelledby", "Show an Alert The moment the event starts");
//////////////////////////////////////////////////////////////////////////
// groupbox labeling from caption label or its sub tree
testName("groupbox", "Some caption");
testName("groupbox2", "Some caption");
SimpleTest.finish();
}
@ -340,6 +345,16 @@
<description>i am visible</description>
<description style="display:none">i am hidden</description>
</hbox>
<!-- Name from label or sub tree -->
<groupbox id="groupbox">
<caption label="Some caption" />
<checkbox label="some checkbox label" />
</groupbox>
<groupbox id="groupbox2">
<caption><label>Some caption</label></caption>
<checkbox label="some checkbox label" />
</groupbox>
</vbox>
<!-- bug 441991; create name from other menuitem label listitem's own label -->

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

@ -69,7 +69,7 @@ XULLabelAccessible::NativeName(nsString& aName)
if (mValueTextLeaf)
return mValueTextLeaf->Name(aName);
return eNameOK;
return Accessible::NativeName(aName);
}
role