Closed Bug 429547 Opened 16 years ago Closed 16 years ago

Support aria-activedescendant usage in nsIAccesible::TakeFocus()

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: surkov)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently we only handle #1 below. We need to implement part 2.

1. If the current element can take real DOM focus, set the DOM focus to it.
2. Otherwise, if the current element has and ID an ancestor with a the aria-activedescendant attribute present, then set DOM focus to that ancestor. If successful, then set aria-activedescendant on the ancestor to the ID of the desired element.
Attached patch patchSplinter Review
Assignee: aaronleventhal → surkov.alexander
Status: NEW → ASSIGNED
Attachment #316645 - Flags: review?(aaronleventhal)
Surkov, do you think that |if (!frame->IsFocusable)| and we don't satisfy all the aria-activedescendant conditions, that we should exit early?

Otherwise looks good.
Comment on attachment 316645 [details] [diff] [review]
patch

Either way, r+, because the focus attempt should fail anyway. It just might be nice to make sure to fail in those cases.
Attachment #316645 - Flags: review?(aaronleventhal) → review+
(In reply to comment #2)
> Surkov, do you think that |if (!frame->IsFocusable)| and we don't satisfy all
> the aria-activedescendant conditions, that we should exit early?
> 
> Otherwise looks good.
> 

Probably that makes sense but I tried to do minimum changes to avoid possible regressions (I keep in mind the case when different accessibles with different frames shares the same DOM node). But if you like I'll change this.
Attachment #316645 - Flags: approval1.9?
True, it is sensible to make the most minimal change.
Possible to add a test here?  Re-request approval once addressed.
Attachment #316645 - Flags: approval1.9? → approval1.9-
Comment on attachment 316645 [details] [diff] [review]
patch

(In reply to comment #6)
> Possible to add a test here?  Re-request approval once addressed.
> 

mochitest with the patch.

re-requesting approval.
Attachment #316645 - Flags: approval1.9- → approval1.9?
Comment on attachment 316645 [details] [diff] [review]
patch

a1.9+=damons
Attachment #316645 - Flags: approval1.9? → approval1.9+
Checking in accessible/src/base/nsAccessible.cpp;
/cvsroot/mozilla/accessible/src/base/nsAccessible.cpp,v  <--  nsAccessible.cpp
new revision: 1.376; previous revision: 1.375
done
Checking in accessible/tests/mochitest/Makefile.in;
/cvsroot/mozilla/accessible/tests/mochitest/Makefile.in,v  <--  Makefile.in
new revision: 1.15; previous revision: 1.14
done
RCS file: /cvsroot/mozilla/accessible/tests/mochitest/test_aria_activedescendant.html,v
done
Checking in accessible/tests/mochitest/test_aria_activedescendant.html;
/cvsroot/mozilla/accessible/tests/mochitest/test_aria_activedescendant.html,v  <--  test_aria_activedescendant.html
initial revision: 1.1
done

Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: