diff --git a/CLOBBER b/CLOBBER index 04652348f9b..da63a8fed89 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,4 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -Merge day clobber +Bug 1214058 New xpcshell test not getting picked up diff --git a/accessible/generic/Accessible.cpp b/accessible/generic/Accessible.cpp index a3e72048af2..fce078d694c 100644 --- a/accessible/generic/Accessible.cpp +++ b/accessible/generic/Accessible.cpp @@ -1238,11 +1238,13 @@ Accessible::ApplyARIAState(uint64_t* aState) const *aState &= ~states::READONLY; if (mContent->HasID()) { - // If has a role & ID and aria-activedescendant on the container, assume focusable - nsIContent *ancestorContent = mContent; - while ((ancestorContent = ancestorContent->GetParent()) != nullptr) { - if (ancestorContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) { - // ancestor has activedescendant property, this content could be active + // If has a role & ID and aria-activedescendant on the container, assume + // focusable. + const Accessible* ancestor = this; + while ((ancestor = ancestor->Parent()) && !ancestor->IsDoc()) { + dom::Element* el = ancestor->Elm(); + if (el && + el->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) { *aState |= states::FOCUSABLE; break; } @@ -1251,12 +1253,12 @@ Accessible::ApplyARIAState(uint64_t* aState) const } if (*aState & states::FOCUSABLE) { - // Special case: aria-disabled propagates from ancestors down to any focusable descendant - nsIContent *ancestorContent = mContent; - while ((ancestorContent = ancestorContent->GetParent()) != nullptr) { - if (ancestorContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_disabled, - nsGkAtoms::_true, eCaseMatters)) { - // ancestor has aria-disabled property, this is disabled + // Propogate aria-disabled from ancestors down to any focusable descendant. + const Accessible* ancestor = this; + while ((ancestor = ancestor->Parent()) && !ancestor->IsDoc()) { + dom::Element* el = ancestor->Elm(); + if (el && el->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_disabled, + nsGkAtoms::_true, eCaseMatters)) { *aState |= states::UNAVAILABLE; break; } diff --git a/accessible/tests/mochitest/attributes/test_obj_group.html b/accessible/tests/mochitest/attributes/test_obj_group.html index 28f45ad4b83..d5fe8947167 100644 --- a/accessible/tests/mochitest/attributes/test_obj_group.html +++ b/accessible/tests/mochitest/attributes/test_obj_group.html @@ -191,6 +191,12 @@ testGroupAttrs("table_cell", 3, 4); testGroupAttrs("table_row", 2, 2); + ////////////////////////////////////////////////////////////////////////// + // ARIA list constructed by ARIA owns + testGroupAttrs("t1_li1", 1, 3); + testGroupAttrs("t1_li2", 2, 3); + testGroupAttrs("t1_li3", 3, 3); + // Test that group position information updates after deleting node. testGroupAttrs("tree4_ti1", 1, 2, 1); testGroupAttrs("tree4_ti2", 2, 2, 1); @@ -453,5 +459,11 @@