Bug 423700 - aria-activedescendant broken on <body>, patch=aaronlev, r=ginn.chen, a=beltzner

This commit is contained in:
surkov.alexander@gmail.com 2008-03-19 18:10:36 -07:00
Родитель d18ecb0e8a
Коммит 83cc25473b
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1142,7 +1142,7 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// The activedescendant universal property redirects accessible focus events
// to the element with the id that activedescendant points to
nsCOMPtr<nsIDOMNode> currentFocus = GetCurrentFocus();
if (currentFocus == targetNode) {
if (SameCOMIdentity(GetRoleContent(currentFocus), targetNode)) {
nsRefPtr<nsRootAccessible> rootAcc = GetRootAccessible();
if (rootAcc)
rootAcc->FireAccessibleFocusEvent(nsnull, currentFocus, nsnull, PR_TRUE);

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

@ -463,7 +463,9 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
domDoc->GetElementById(id, getter_AddRefs(relatedEl));
finalFocusNode = do_QueryInterface(relatedEl);
if (!finalFocusNode) {
return PR_FALSE;
// If aria-activedescendant is set to nonextistant ID, then treat as focus
// on the activedescendant container (which has real DOM focus)
finalFocusNode = aNode;
}
finalFocusAccessible = nsnull;
}