Bug 1050926 - taking into account aria-hidden when traversing subtree. r=eeejay

---
 accessible/jsat/Utils.jsm                        |  4 +++-
 accessible/tests/mochitest/jsat/test_output.html | 13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
This commit is contained in:
Yura Zenevich 2014-08-11 09:32:09 -04:00
Родитель 115f77927e
Коммит d872279251
2 изменённых файлов: 16 добавлений и 1 удалений

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

@ -749,7 +749,9 @@ PivotContext.prototype = {
if (this._includeInvisible) {
include = true;
} else {
include = !(Utils.getState(child).contains(States.INVISIBLE));
// Need to account for aria-hidden, so can't just check for INVISIBLE
// state.
include = Utils.getAttributes(child).hidden !== 'true';
}
if (include) {
if (aPreorder) {

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

@ -388,6 +388,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753984
expectedBraille: [
[{"string": "listboxoptionAbbr"}, "Search suggestion"],
["Search suggestion", {"string": "listboxoptionAbbr"}]]
}, {
accOrElmOrID: "listbox-option2",
oldAccOrElmOrID: "listbox-option",
expectedUtterance: [[{"string": "listboxoption"}, "555-12345"],
["555-12345", {"string": "listboxoption"}]],
expectedBraille: [[{"string": "listboxoptionAbbr"}, "555-12345"],
["555-12345", {"string": "listboxoptionAbbr"}]]
}];
// Test all possible utterance order preference values.
@ -507,6 +514,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753984
<div id="togglebutton_pressed" aria-pressed="true" role="button" tabindex="-1">I am pressed!</div>
<ul role="listbox" style="list-style-type: none;">
<li role="option" id="listbox-option">Search suggestion</li>
<li role="option" id="listbox-option2">
<label aria-hidden="true">
<input type="checkbox" />
</label>
555-12345
</li>
</ul>
</div>
</body>