Note: There are a few cases of duplicates in user autocompletion which are being worked on.

[AccessFu] Support skip links

VERIFIED FIXED in mozilla15

Status

()

Core
Disability Access APIs
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla15
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Sites will often have links that skip to anchors in the site. We should move the virtual cursor to the anchor.
(Assignee)

Comment 1

5 years ago
Created attachment 629198 [details] [diff] [review]
Support skip links

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?)
(Assignee)

Comment 3

5 years ago
(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)

Comment 6

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/48a60f4f7264
Assignee: nobody → eitan
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/48a60f4f7264
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 8

5 years ago
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.