[g-a-devel]Re: questions on nsIAccessibleHyperLink
- From: Peter Korn <peter korn sun com>
- To: gilbert fang sun com
- Cc: Bill Hanema <bill haneman sun com>, John Gaunt <jgaunt netscape com>, Browser China Accessibilty Task Force <browser-china-atf sun com>, Aaron Leventhal <aaronl netscape com>, Gnome Accessibility Developers <Gnome-accessibility-devel gnome org>, Lynn Monsanto <lynn monsanto sun com>
- Subject: [g-a-devel]Re: questions on nsIAccessibleHyperLink
- Date: Fri, 14 Jun 2002 16:13:31 -0700
Hi Gilbert,
I've cc-ed Lynn Monsanto, who implemented AccessibleHypertext on Swing (and/or
worked with the folks on the Swing team who did so).
The main design center for this API was client side image maps, where one
visible "object" really had multiple links on it.
In your case below:
<a> first part <img src=second.img> third part</a>
we would have thought of this as one Hyperlink with a single start & end
index. That the Netscape accessibility infrastructure already sees it as three
is disappointing, and I'm not sure what we can/should do about that.
Making it three links - I'm assuming now that the full HTML looks more like:
<a href="newPage.html" alt="A new page"> first part <img src=second.img
alt="second image"> third part</a>
means that an AT that wants to give the user a quick list of all links and
their descriptions would then present the user with:
...
Link: "A new page" at "first part" going to "newPage.html"
Link: "A new page" at "[image: second image]" going to "newPage.html"
Link: "A new page" at "third part" going to "newPage.html"
...
which is wasteful and duplication, as opposed to:
...
Link: "A new page" at "first part [image: second part] third part"
going to "newPage.html"
...
(image above that each line is successively spoken or sent to Braille, and the
"[image: ...]" is either spoken in a different voice or indicated in Braille
with a special dot-pattern.
Let me suggest another example to consider:
<map name="bannerMap"><area coords="538,0,681,4" href="index.html" alt="Go to
start"><!--home--><area coords="616,30,639,53" href="end.html" alt="previous
page"><!--back--><area coords="645,30,669,53" href="overview-all.html"
alt="next page"><!--forward--></map>
Here (above) we have a client-side image map with three objects, three interior
bounding rectangles, three ALT tags, and three links. This could be treated as
three logical Hyperlinks very naturally. Unfortunately, the present Hyperlink
object doesn't have a way to indicate the bounding rectangle of each link
region (which one might want to do with AccessibleComponent and have them be
children of the entire map object).
Bill - I'm curious to hear your thoughts...
Peter
> I am Gilbert from Sun browser accessible group(ATF). Now I am
> implementing the nsIAccessibleHyperlink. There are some questions on
> that interface:
>
> So unfortunately, in jdk 1.3's document, the only class which implements
> AccessibleHyperlink is
> JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
> (http://java.sun.com/j2se/1.3/docs/api/javax/swing/JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.html)
> And this class actually does not support any multi-anchor hyperlink.
> See its codes:
> public int getAccessibleActionCount() {
> return 1;
> }
> and
> public Object getAccessibleActionObject(int i) {
> if (i == 0 && isValid() == true) {
> AttributeSet as = element.getAttributes();
> AttributeSet anchor =
> (AttributeSet) as.getAttribute(HTML.Tag.A);
> String href = (anchor != null) ?
> (String) anchor.getAttribute(HTML.Attribute.HREF) : null;
> if (href != null) {
> URL u;
> try {
> u = new URL(JEditorPane.this.getPage(), href);
> } catch (MalformedURLException m) {
> u = null;
> }
> return u;
> }
> }
> return null; // link invalid or i != 0
> }
> It always return 1 for count and only support the index 0.
> So, if we have such kind of hypertext, how do we construct anchors for it?
> <a> first part <img src=second.img> third part</a>
> Now, in mozilla, it will be exposed as a link accNode(ROLE_LINK) with three
> accChildren, accNodeA (ROLE_TEXT) for " first part",
> accNodeB(ROLE_GRAPHIC) for
> the "second.img" , accNodeC(ROLE_TEXT) for "third part".
> In my opinion, it should be a hyperlink with *3* anchors with the same
> action(url). Although it actually has just one tag <a href=>, it will be
> showed as three part in user interface in *3* area.
> Hi, Bill and Aron and John, could u tell what your suggestions are ?
>
> You can alse find thees questions at
> <http://bugzilla.mozilla.org/show_bug.cgi?id=150603#c4>
> and <http://bugzilla.mozilla.org/show_bug.cgi?id=150603#c5>
>
> Thanks & Best regards
> Gilbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]