From d87227925106b57ba3e3d19b991f8edc410312fa Mon Sep 17 00:00:00 2001 From: Yura Zenevich Date: Mon, 11 Aug 2014 09:32:09 -0400 Subject: [PATCH] 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(-) --- accessible/jsat/Utils.jsm | 4 +++- accessible/tests/mochitest/jsat/test_output.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/accessible/jsat/Utils.jsm b/accessible/jsat/Utils.jsm index 25982e1dd464..d84d71b923db 100644 --- a/accessible/jsat/Utils.jsm +++ b/accessible/jsat/Utils.jsm @@ -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) { diff --git a/accessible/tests/mochitest/jsat/test_output.html b/accessible/tests/mochitest/jsat/test_output.html index 5c1e4e9c0e05..01b4e2ebef4f 100644 --- a/accessible/tests/mochitest/jsat/test_output.html +++ b/accessible/tests/mochitest/jsat/test_output.html @@ -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
I am pressed!