mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 347219. File inputs and other embedded form controls in radio buttons not accessible. For chrome changes, r=mano. For mozilla/accessible changes, r=ginn.chen, sr=neil
This commit is contained in:
parent
56bf49ff3f
commit
71bcdd181f
@ -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<nsIDOMXULLabeledControlElement> 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<nsIDOMXULSelectControlElement> 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);
|
||||
|
@ -197,14 +197,13 @@
|
||||
<groupbox id="cacheGroup">
|
||||
<caption label="&cache.label;"/>
|
||||
|
||||
<hbox xhtml2:role="wairole:label" id="cacheSizeBox" align="center">
|
||||
<hbox id="cacheSizeBox" align="center">
|
||||
<label control="cacheSize"
|
||||
accesskey="&useCacheBefore.accesskey;">&useCacheBefore.label;</label>
|
||||
<textbox id="cacheSize" size="2"
|
||||
preference="browser.cache.disk.capacity"
|
||||
onsyncfrompreference="return gAdvancedPane.readCacheSize();"
|
||||
onsynctopreference="return gAdvancedPane.writeCacheSize();"
|
||||
xhtml2:role="wairole:textfield"
|
||||
aaa:labelledby="cacheSizeBox"/>
|
||||
<label>&useCacheAfter.label;</label>
|
||||
</hbox>
|
||||
|
@ -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 @@
|
||||
<vbox id="changeActionContent" flex="1">
|
||||
<label control="handlerGroup">&whenDownloading.label;</label>
|
||||
<radiogroup id="handlerGroup" onselect="gChangeActionDialog.doEnabling(this.selectedItem);"
|
||||
flex="1" xhtml2:role="wairole:radiogroup" aaa:describedby="changeActionHeader">
|
||||
flex="1" aaa:describedby="changeActionHeader">
|
||||
<separator class="thin"/>
|
||||
<radio id="openDefault" value="system"
|
||||
label="&openDefault.label;" accesskey="&openDefault.accesskey;"/>
|
||||
label="&openDefault.label;" accesskey="&openDefault.accesskey;"
|
||||
aaa:labelledby="openDefault defaultApp"/>
|
||||
<filefield class="indent" id="defaultApp" disabled="true"/>
|
||||
<separator class="thin"/>
|
||||
<radio id="openApplication" value="app"
|
||||
label="&openApplication.label;" accesskey="&openApplication.accesskey;"/>
|
||||
label="&openApplication.label;" accesskey="&openApplication.accesskey;"
|
||||
aaa:labelledby="openApplication customApp"/>
|
||||
<hbox align="center">
|
||||
<filefield id="customApp" class="indent" flex="1" disabled="true"/>
|
||||
<button id="changeApp" oncommand="gChangeActionDialog.changeApp();"
|
||||
@ -94,7 +94,8 @@
|
||||
<radio id="saveToDefault" value="default" selected="true"
|
||||
label="&saveToDefaultFolder.label;" accesskey="&saveToDefaultFolder.accesskey;"/>
|
||||
<radio id="saveToCustom" value="custom"
|
||||
label="&saveToThisFolder.label;" accesskey="&saveToThisFolder.accesskey;"/>
|
||||
label="&saveToThisFolder.label;" accesskey="&saveToThisFolder.accesskey;"
|
||||
aaa:labelledby="saveToCustom customDownloadFolder"/>
|
||||
<hbox align="center" class="indent">
|
||||
<filefield id="customDownloadFolder" flex="1"/>
|
||||
<button id="chooseCustomDownloadFolder" oncommand="gChangeActionDialog.changeCustomFolder();"
|
||||
@ -104,7 +105,8 @@
|
||||
label="&saveToAskMe.label;" accesskey="&saveToAskMe.accesskey;"/>
|
||||
</radiogroup>
|
||||
<radio id="plugin" value="plugin"
|
||||
label="&usePlugin.label;" accesskey="&usePlugin.accesskey;"/>
|
||||
label="&usePlugin.label;" accesskey="&usePlugin.accesskey;"
|
||||
aaa:labelledby="plugin pluginName"/>
|
||||
<filefield class="indent" id="pluginName" disabled="true"/>
|
||||
</radiogroup>
|
||||
</vbox>
|
||||
|
@ -168,7 +168,9 @@
|
||||
<hbox id="saveToRow">
|
||||
<radio id="saveTo" value="true"
|
||||
label="&saveTo.label;"
|
||||
accesskey="&saveTo.accesskey;"/>
|
||||
accesskey="&saveTo.accesskey;"
|
||||
xmlns:aaa="http://www.w3.org/2005/07/aaa"
|
||||
aaa:labelledby="saveTo downloadFolder"/>
|
||||
<filefield id="downloadFolder" flex="1"
|
||||
preference="browser.download.folderList"
|
||||
preference-editable="true"
|
||||
|
@ -98,18 +98,16 @@
|
||||
|
||||
<!-- History -->
|
||||
<groupbox id="historyGroup"
|
||||
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">
|
||||
<caption label="&history.label;"/>
|
||||
|
||||
<hbox id="historyBox" align="center" xhtml2:role="wairole:label">
|
||||
<hbox id="historyBox" align="center">
|
||||
<checkbox id="rememberHistoryDays"
|
||||
label="&rememberBefore.label;"
|
||||
accesskey="&rememberBefore.accesskey;"
|
||||
oncommand="gPrivacyPane.onchangeHistoryDaysCheck();"/>
|
||||
oncommand="gPrivacyPane.onchangeHistoryDaysCheck();"
|
||||
aaa:labelledby="historyBox"/>
|
||||
<textbox id="historyDays" size="3"
|
||||
xhtml2:role="wairole:textfield"
|
||||
aaa:labelledby="historyBox"/>
|
||||
<label>&rememberAfter.label;</label>
|
||||
</hbox>
|
||||
|
@ -82,8 +82,6 @@
|
||||
|
||||
<!-- addons, forgery (phishing) UI -->
|
||||
<groupbox id="addonsPhishingGroup"
|
||||
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">
|
||||
<hbox id="addonInstallBox">
|
||||
<checkbox id="warnAddonInstall" flex="1"
|
||||
@ -112,15 +110,14 @@
|
||||
label="&useDownloadedList.label;"
|
||||
accesskey="&useDownloadedList.accesskey;"
|
||||
value="false"/>
|
||||
<hbox id="onloadBox" align="center" xhtml2:role="wairole:label">
|
||||
<hbox id="onloadBox" align="center">
|
||||
<radio id="onloadRadio"
|
||||
label="&askThirdParty.label;"
|
||||
accesskey="&askThirdParty.accesskey;"
|
||||
value="true"/>
|
||||
value="true" aaa:labelledby="onloadBox"/>
|
||||
<menulist id="onloadProvider"
|
||||
preference="browser.safebrowsing.dataProvider"
|
||||
onsyncfrompreference="return gSecurityPane.readOnloadPhishProvider();"
|
||||
xhtml2:role="wairole:list"
|
||||
aaa:labelledby="onloadBox"/>
|
||||
<label id="onloadAfter">&askThirdPartyAfter.label;</label>
|
||||
</hbox>
|
||||
|
@ -5,17 +5,15 @@
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<binding id="fileField">
|
||||
<binding id="fileField" extends="chrome://global/content/bindings/general.xml#control-item">
|
||||
<content>
|
||||
<xul:stringbundle anonid="bundle" src="chrome://mozapps/locale/preferences/preferences.properties"/>
|
||||
<xul:hbox class="fileFieldContentBox" align="center" flex="1">
|
||||
<xul:image class="fileFieldIcon" xbl:inherits="src=image"/>
|
||||
<xul:textbox class="fileFieldLabel" xbl:inherits="value=label,disabled" flex="1" readonly="true"/>
|
||||
<xul:textbox class="fileFieldLabel" xbl:inherits="value=label,disabled,accesskey,tabindex" flex="1" readonly="true"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
<implementation>
|
||||
<property name="image" onget="return this.getAttribute('image');"
|
||||
onset="this.setAttribute('image', val); return val;"/>
|
||||
<implementation implements="nsIDOMXULLabeledControlElement">
|
||||
<property name="label" onget="return this.getAttribute('label');">
|
||||
<setter>
|
||||
this.setAttribute('label', val);
|
||||
@ -42,9 +40,6 @@
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
<property name="disabled" onget="return this.getAttribute('disabled');"
|
||||
onset="this.setAttribute('disabled', val); return val;"/>
|
||||
|
||||
<method name="_getDisplayNameForFile">
|
||||
<parameter name="aFile"/>
|
||||
<body>
|
||||
|
Loading…
Reference in New Issue
Block a user