[g-a-devel]questions on nsIAccessibleHyperLink
- From: Gilbert Fang <gilbert fang sun com>
- To: Bill Hanema <bill haneman sun com>, John Gaunt <jgaunt netscape com>
- Cc: Browser China Accessibilty Task Force <browser-china-atf sun com>, Peter Korn <Peter Korn sun com>, Aaron Leventhal <aaronl netscape com>, Gnome Accessibility Developers <Gnome-accessibility-devel gnome org>
- Subject: [g-a-devel]questions on nsIAccessibleHyperLink
- Date: Fri, 14 Jun 2002 16:41:15 +0800
Hi, Bill and John,
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]