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

git-svn-id: svn://10.0.0.236/trunk@248238 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
surkov.alexander%gmail.com 2008-03-20 01:10:36 +00:00
parent eccaf4ccfb
commit e555da45a6
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}