Bug 390673. JAWS speaking ARIA alerts twice. r=simon.bates, a=dbaron

This commit is contained in:
aaronleventhal@moonset.net 2007-08-03 18:14:09 -07:00
Родитель c9612ce1ce
Коммит 4fc3da91bb
2 изменённых файлов: 1 добавлений и 44 удалений

Просмотреть файл

@ -61,7 +61,7 @@ static const nsStateMapEntry kEndEntry = {0, 0, 0}; // To fill in array of stat
nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
{"alert", nsIAccessibleRole::ROLE_ALERT, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
{"alert", nsIAccessibleRole::ROLE_ALERT, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"alertdialog", nsIAccessibleRole::ROLE_ALERT, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
{"application", nsIAccessibleRole::ROLE_APPLICATION, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"button", nsIAccessibleRole::ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, kNoReqStates,

Просмотреть файл

@ -64,46 +64,3 @@ nsXULAlertAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
return NS_OK;
}
#if 0
// We don't need this, but the AT will need to read all of the alert's children
// when it receives EVENT_ALERT on a ROLE_ALERT
NS_IMETHODIMP nsXULAlertAccessible::GetName(nsAString &aName)
{
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
if (!presShell) {
return NS_ERROR_FAILURE; // Node already shut down
}
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
NS_ASSERTION(content, "Should not be null if we still have a presShell");
nsCOMPtr<nsIDOMNodeList> siblingList;
// returns null if no anon nodes
presShell->GetDocument()->GetXBLChildNodesFor(content,
getter_AddRefs(siblingList));
if (siblingList) {
PRUint32 length, count;
siblingList->GetLength(&length);
for (count = 0; count < length; count ++) {
nsCOMPtr<nsIDOMNode> domNode;
siblingList->Item(count, getter_AddRefs(domNode));
nsCOMPtr<nsIDOMXULLabeledControlElement> labeledEl(do_QueryInterface(domNode));
if (labeledEl) {
nsAutoString label;
labeledEl->GetLabel(label);
aName += NS_LITERAL_STRING(" ") + label + NS_LITERAL_STRING(" ");
}
else {
nsCOMPtr<nsIContent> content(do_QueryInterface(domNode));
if (content) {
AppendFlatStringFromSubtree(content, &aName);
}
}
}
}
else {
AppendFlatStringFromSubtree(content, &aName);
}
return NS_OK;
}
#endif