diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 305d0019cf05..83eee48822cd 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -1624,11 +1624,16 @@ nsAccessible::AppendFlatStringFromSubtreeRecurse(nsIContent *aContent, // Append all the text into one flat string PRUint32 numChildren = 0; nsCOMPtr selectControlEl(do_QueryInterface(aContent)); - - if (!selectControlEl && aContent->Tag() != nsAccessibilityAtoms::textarea) { + nsCOMPtr tag = aContent->Tag(); + + if (!selectControlEl && + tag != nsAccessibilityAtoms::textarea && + tag != nsAccessibilityAtoms::select) { // Don't walk children of elements with options, just get label directly. // Don't traverse the children of a textarea, we want the value, not the // static text node. + // Don't traverse the children of a select element, we only want the + // current value. numChildren = aContent->GetChildCount(); } diff --git a/accessible/tests/mochitest/test_nsIAccessible_name.html b/accessible/tests/mochitest/test_nsIAccessible_name.html index 253479dd1176..ec354aef7b9b 100644 --- a/accessible/tests/mochitest/test_nsIAccessible_name.html +++ b/accessible/tests/mochitest/test_nsIAccessible_name.html @@ -128,6 +128,11 @@ testName("textareawithchild", "Story: Bar"); + ///////////////////////////////////////////////////////////////////////// + // label with nested combobox + + testName("comboinmiddle", "Subscribe to ATOM feed."); + SimpleTest.finish(); } @@ -281,5 +286,17 @@ + +
+ +
+