[g-a-devel]Re: questions on nsIAccessibleHyperLink



Hi, Peter
Thank you very much for your suggestons.

But for details, eg. in this case:
I'm assuming now that the full HTML looks more like:

  <a href="" alt="A new page"> first part <img src=""
alt="second image"> third part</a>
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.
We consider it as a HyperLink with one anchor, (mozilla did not see it as three link but three accChildren, my suggestion is to
see it as three but now I will change my points according to your explanation). But in ATK, we only can get ONE OBJECT
for one anchor. How do we expose there are really three part contents .
AtkObject*  atk_hyperlink_get_object        (AtkHyperlink *link,gint i);
Are there any AtkObject can represent three other kind of objects, one for text, one for image and last one 
for text. I wonder how ATK implement this ,or just leave this problem  to ATK 2.1 or later?

Thanks and Best Regards.
Gilbert 



Peter Korn wrote:
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="" 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="" alt="A new page"> first part <img src=""
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="" alt="Go to
start"><!--home--><area coords="616,30,639,53" href="" alt="previous
page"><!--back--><area coords="645,30,669,53" href=""
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 = "" != 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="" 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]