diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 53b7d7f6d1f5..d41078c40bc7 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -1359,17 +1359,17 @@ nsresult nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent, nsA if (!frame || !frame->GetStyleVisibility()->IsVisible()) { return NS_OK; } - - if (aContent->Tag() == nsAccessibilityAtoms::label || - aContent->Tag() == nsAccessibilityAtoms::description) { - aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, - textEquivalent); + + nsCOMPtr labeledEl(do_QueryInterface(aContent)); + if (labeledEl) { + labeledEl->GetLabel(textEquivalent); } - else if (!aContent->GetAttr(kNameSpaceID_None, - nsAccessibilityAtoms::tooltiptext, textEquivalent) || - textEquivalent.IsEmpty()) { - AppendNameFromAccessibleFor(aContent, aFlatString, PR_TRUE /* use value */); + else { + aContent->GetAttr(kNameSpaceID_None, + nsAccessibilityAtoms::tooltiptext, textEquivalent); } + AppendNameFromAccessibleFor(aContent, &textEquivalent, PR_TRUE /* use value */); + return AppendStringWithSpaces(aFlatString, textEquivalent); } return NS_OK; // Not HTML and not XUL -- we don't handle it yet @@ -1431,14 +1431,19 @@ nsresult nsAccessible::AppendFlatStringFromSubtreeRecurse(nsIContent *aContent, { // Depth first search for all text nodes that are decendants of content node. // Append all the text into one flat string - - PRUint32 numChildren = aContent->GetChildCount(); + PRUint32 numChildren = 0; + nsCOMPtr selectControlEl(do_QueryInterface(aContent)); + if (!selectControlEl) { // Don't walk children of elements with options, just get label directly + numChildren = aContent->GetChildCount(); + } if (numChildren == 0) { + // There are no children or they are irrelvant: get the text from the current node AppendFlatStringFromContentNode(aContent, aFlatString); return NS_OK; } + // There are relevant children: use them to get the text. PRUint32 index; for (index = 0; index < numChildren; index++) { AppendFlatStringFromSubtreeRecurse(aContent->GetChildAt(index), aFlatString); diff --git a/browser/components/preferences/advanced.xul b/browser/components/preferences/advanced.xul index 4e83556bc61e..067558e24a40 100644 --- a/browser/components/preferences/advanced.xul +++ b/browser/components/preferences/advanced.xul @@ -197,14 +197,13 @@ - + diff --git a/browser/components/preferences/changeaction.xul b/browser/components/preferences/changeaction.xul index 6ddd822adafc..78fb904d87dc 100644 --- a/browser/components/preferences/changeaction.xul +++ b/browser/components/preferences/changeaction.xul @@ -50,8 +50,6 @@ buttons="accept,cancel,help" ondialogaccept="return gChangeActionDialog.onAccept();" ondialoghelp="openHelp('prefs-download-actions', 'chrome://browser/locale/help/help.rdf');" - xmlns:xhtml2="http://www.w3.org/TR/xhtml2" - xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:aaa="http://www.w3.org/2005/07/aaa" style="width: &window.width;;" persist="screenX screenY"> @@ -72,14 +70,16 @@ + flex="1" aaa:describedby="changeActionHeader"> + label="&openDefault.label;" accesskey="&openDefault.accesskey;" + aaa:labelledby="openDefault defaultApp"/> + label="&openApplication.label;" accesskey="&openApplication.accesskey;" + aaa:labelledby="openApplication customApp"/>