diff --git a/accessible/src/xul/XULFormControlAccessible.cpp b/accessible/src/xul/XULFormControlAccessible.cpp index 140250a64bd..7964499c87b 100644 --- a/accessible/src/xul/XULFormControlAccessible.cpp +++ b/accessible/src/xul/XULFormControlAccessible.cpp @@ -167,23 +167,13 @@ XULButtonAccessible::CacheChildren() { // In general XUL button has not accessible children. Nevertheless menu // buttons can have button (@type="menu-button") and popup accessibles - // (@type="menu-button" or @type="menu"). + // (@type="menu-button", @type="menu" or columnpicker. // XXX: no children until the button is menu button. Probably it's not // totally correct but in general AT wants to have leaf buttons. - bool isMenu = mContent->AttrValueIs(kNameSpaceID_None, - nsGkAtoms::type, - nsGkAtoms::menu, - eCaseMatters); - bool isMenuButton = isMenu ? - false : - mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, - nsGkAtoms::menuButton, eCaseMatters); - - NS_ENSURE_TRUE_VOID(mDoc); - if (!isMenu && !isMenuButton) - return; + bool isMenuButton = mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, + nsGkAtoms::menuButton, eCaseMatters); Accessible* menupopup = nullptr; Accessible* button = nullptr; diff --git a/accessible/tests/mochitest/tree/test_tree.xul b/accessible/tests/mochitest/tree/test_tree.xul index 001c4ab9f0e..60a1b116bcf 100644 --- a/accessible/tests/mochitest/tree/test_tree.xul +++ b/accessible/tests/mochitest/tree/test_tree.xul @@ -76,9 +76,9 @@ var columnCount = treeBoxObject.columns.count; for (var idx = 0; idx < columnCount; idx++) - accTreeForColumns.children.push({ role: ROLE_COLUMNHEADER, children: []}); + accTreeForColumns.children.push({ COLUMNHEADER: [ ] }); if (!aTree.hasAttribute("hidecolumnpicker")) - accTreeForColumns.children.push({ role: ROLE_PUSHBUTTON, children: []}); + accTreeForColumns.children.push({ PUSHBUTTON: [ { MENUPOPUP: [] } ] }); for (var idx = 0; idx < view.rowCount; idx++) accTreeForTree.children.push(getTreeItemAccTree(aRole, columnCount)); diff --git a/accessible/tests/mochitest/treeupdate/test_menubutton.xul b/accessible/tests/mochitest/treeupdate/test_menubutton.xul index 60d1592b41a..4821a265bdb 100644 --- a/accessible/tests/mochitest/treeupdate/test_menubutton.xul +++ b/accessible/tests/mochitest/treeupdate/test_menubutton.xul @@ -8,6 +8,8 @@