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