[Accessibility-atspi] Collection of Hyperlinks

Bill Haneman Bill.Haneman at Sun.COM
Thu Mar 16 09:54:31 PST 2006


On Thu, 2006-03-16 at 17:22, Larry Weiss wrote:
...
> > 
> > > Consider the following HTML:
> > >   <p><a tabindex="1" href="http://www.one.com/">One</a>
> > >   <a tabindex="4" href="http://www.four.com/">Four</a>
> > >   <a tabindex="7" href="http://www.seven.com/">Seven</a>
> > >   </p>
> > >   <p><a tabindex="2" href="http://www.two.com/">Two</a>
> > >   <a tabindex="5" href="http://www.five.com/">Five</a>
> > >   <a tabindex="8" href="http://www.eight.com/">Eight</a>
> > >   </p>
> > >   <p><a tabindex="3" href="http://www.three.com/">Three</a>
> > >   <a tabindex="6" href="http://www.six.com/">Six</a>
> > >   <a tabindex="9" href="http://www.nine.com/">Nine</a>
> > >   </p>
> > > How can I (an AT) use Collection to present each of the 9 links in
> tab
> > > order ( Collection::getChildren(MatchRule, SORT_ORDER_TAB,...))?
> > 
> > You cannot, but you can use Collection to get the individual
> Hypertext
> > objects in tab order.  Each Hypertext object then gives you the
> > links.    
> > 
> Which would return the 3 Hypertext objects in the order typed: "One
> Four Seven", "Two Five Eight", and "Three Six Nine".
> 
> > If we add a Hypertext::getLinks(..., SORT_ORDER_TYPE) sort of call,
> > you'd only need three client calls to get what you want.  Based on
> our
> > experience with things that currently require hundreds of client
> calls
> > (and still work reasonably well), this should be plenty fast.
> > 
> Which would give me the 3 links each in the order typed: "One Four
> Seven" for the first Hypertext object, "Two Five Eight" for the
> second, and "Three Six Nine" for the third.
> 
> The problem is the context: In the context of the Document, the
> SORT_ORDER_TAB of the Hypertext objects (paragraphs) is (correctly)
> the order typed. And the context of a single Hypertext object, the
> SORT_ORDER_TAB of the Hyperlinks is also the order typed. But to
> properly order these links, I need a Document context for Hyperlinks
> to correctly get the SORT_ORDER_TAB for all of the links: "One Two
> Three Four Five Six Seven Eight Nine".

We have proposed before that the tab order be included in the list of
object attributes.

While I agree that we should be flexible enough to handle "all cases", I
suggest that the above example is slightly pathological, in that the
three paragraphs flow orthogonally to the hyperlinks.  I am having
difficulty in envisioning an example where that _wouldn't_ seem like bad
or arbitrary design, from the end-user perspective.

> > If what you want to do is speak the _text_ of each link, then you
> should
> > probably use Collection to retrieve the text substrings with the
> "link"
> > TextAttribute (there should be one, to be consistent with the
> onscreen
> > presentation).  Obviously for mixed text and image links, a little
> more
> > smarts will be needed, but I don't think this is a particular
> efficiency
> > bottleneck.
> > 
> I need the anchor text, the URI, a means to activate the link, and a
> means to navigate to the link. And due to the increasing use of
> tabindex, I really need that info in tabindex order.

You can get everything but the tabindex order now, from
Hypertext+Hyperlink.  If the tab order spans multiple paragraphs and
flows orthogonally as in your example, you're going to have to use
tab-order object attributes anyway.

An alternative would be to coalesce the three paragraphs into a single
Hypertext object, which is permissible.

Bill

> > regards,
> > 
> > Bill
> > 
> > > Have fun,
> > > Larry.
> > 




More information about the Accessibility-atspi mailing list