Closed Bug 760451 Opened 14 years ago Closed 14 years ago

[AccessFu] Support skip links

Categories

(Core :: Disability Access APIs, defect)

ARM
Android
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla15

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

Sites will often have links that skip to anchors in the site. We should move the virtual cursor to the anchor.
This uses EVENT_SCROLLING_START, which is a curious name, but seems to do what we need.
Attachment #629198 - Flags: review?(dbolter)
Comment on attachment 629198 [details] [diff] [review] Support skip links Review of attachment 629198 [details] [diff] [review]: ----------------------------------------------------------------- ::: accessible/src/jsat/AccessFu.jsm @@ +351,5 @@ > } > break; > } > + case Ci.nsIAccessibleEvent.EVENT_SCROLLING_START: > + { Yeah, strange but true - this seems to be the event to watch. I wonder why we didn't call it something related to anchors... ::: accessible/src/jsat/VirtualCursorController.jsm @@ +174,5 @@ > + } catch (x) { > + doc = doc.parentDocument; > + continue; > + } > + vc.moveNext(aRule || this.SimpleTraversalRule, aAccessible, true); Will this throw a type error if vc is null? (Can vc be null here?)
(In reply to David Bolter [:davidb] from comment #2) > Comment on attachment 629198 [details] [diff] [review] > Support skip links > > Review of attachment 629198 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: accessible/src/jsat/VirtualCursorController.jsm > @@ +174,5 @@ > > + } catch (x) { > > + doc = doc.parentDocument; > > + continue; > > + } > > + vc.moveNext(aRule || this.SimpleTraversalRule, aAccessible, true); > > Will this throw a type error if vc is null? (Can vc be null here?) If it has the cursorable interface, it should always have a virtual cursor. But null checking would not be such a bad practice here, so I could add that.
Comment on attachment 629198 [details] [diff] [review] Support skip links Review of attachment 629198 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the null check thanks.
Attachment #629198 - Flags: review?(dbolter) → review+
Wait, there are no cases it wouldn't have a vc? If so then no null check is fine.
Assignee: nobody → eitan
Target Milestone: --- → mozilla15
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Verified fixed in Fennec/Android 16.0a1 2012/06/05.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: