[Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

Peter Vágner
Hello guys,
I am not sure this is a bug so I am not filling it in the trac.
When browsing sites such as wikipedia or other media wiki based samepage
links are working great. Samepage links at the other websites dont seem
to be working for me. E.G. you can see one at
http://www.freedomscientific.com.

Other thing I would like to get some feedback on is ability to anounce
labeled graphics. For sure alt tag takes precedence over title property
but firefox rather exposes emtpy alt rather than falling to title when
empty quotes are assigned to the alt tag.

And finally what I am interested in are imagemap links. Has anybody
found some working imagemap link examples?

Are some of these things tracked in the firefox bug tracker or is some
of you aware of any discussion on this?
Do we have ability to do something about these or the only place which
has to be adapted is firefox or some websites using these features?

Peter


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

Iris Pang`
By imagemap links do you mean those containing graphics?
Iris


You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

James Teh-2
In reply to this post by Peter Vágner
Peter Vágner wrote:
> When browsing sites such as wikipedia or other media wiki based samepage
> links are working great. Samepage links at the other websites dont seem
> to be working for me. E.G. you can see one at
> http://www.freedomscientific.com.
IF you mean the "Skip to main content" link, this is actually a fault
with the web site. The HTML 4.0 specification notes that the id
attribute on HTML elements becomes a link destination. Unfortunately,
they have done the following:
> <div id="skip" tabindex="1"><a href="#skip" title="Skip to Main Content">Skip to Main Content</a>
> </div>
The "skip" id on the div means that <a href="#skip"> actually jumps to
the div containing the link itself, instead of jumping to the <a
name="skip"> later on in the document as intended. This works as
intended in IE, so perhaps IE ensures that <a name="name"> takes
precedence over the id attribute or perhaps it ignores the id attribute
if the link is contained within that element. There might be a
requirement that <a name="name"> should take precedence, but I haven't
seen it and I doubt it.

Anyway, there is currently another problem with same page links in NVDA.
A same page link often causes the focus to hit the document and at
present, NVDA performs a say all when the document receives focus. This
then causes the caret to move to the top of the document. I'm trying to
think of some better logic for handling say all on documents; we really
shouldn't perform a say all just because the focus hits the document.

> Other thing I would like to get some feedback on is ability to anounce
> labeled graphics. For sure alt tag takes precedence over title property
> but firefox rather exposes emtpy alt rather than falling to title when
> empty quotes are assigned to the alt tag.
Arguably, if the alt attribute is empty, the web designer has explicitly
declared that the image should have no alternative text. This trick is
used for visual images which have no semantic meaning; e.g. spacers,
dots, etc. There should never really be any cases where the title
attribute is populated but the alt attribute is not, but unfortunately,
as is too often the case, bad design prevails. I guess Firefox should
probably use the title attribute if it is present and the alt attribute
is empty. There is no way to do this from NVDA, so a feature request
would need to be filed for Firefox.

Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

Peter Vágner
Hello,

James Teh  wrote:

> IF you mean the "Skip to main content" link, this is actually a fault
> with the web site. The HTML 4.0 specification notes that the id
> attribute on HTML elements becomes a link destination.
> The "skip" id on the div means that<a href="#skip">  actually jumps to
> the div containing the link itself, instead of jumping to the<a
> name="skip">  later on in the document as intended. This works as
> intended in IE, so perhaps IE ensures that<a name="name">  takes
> precedence over the id attribute or perhaps it ignores the id attribute
> if the link is contained within that element. There might be a
> requirement that<a name="name">  should take precedence, but I haven't
> seen it and I doubt it.
>
Now I am a bit confused. So using ids is not the correct way to define
samepage link destinations? We do have such construction in NVDA users
guide.
Additionally do such links work in firefox it-self (for sighted people
when NVDA is not runing)?

> Anyway, there is currently another problem with same page links in NVDA.
> A same page link often causes the focus to hit the document and at
> present, NVDA performs a say all when the document receives focus. This
> then causes the caret to move to the top of the document. I'm trying to
> think of some better logic for handling say all on documents; we really
> shouldn't perform a say all just because the focus hits the document.
>
I think when this can't be sorted I'd rather have samepage links working
than automatic say all when the document is loaded.

> Arguably, if the alt attribute is empty, the web designer has explicitly
> declared that the image should have no alternative text. This trick is
> used for visual images which have no semantic meaning; e.g. spacers,
> dots, etc. There should never really be any cases where the title
> attribute is populated but the alt attribute is not, but unfortunately,
> as is too often the case, bad design prevails. I guess Firefox should
> probably use the title attribute if it is present and the alt attribute
> is empty. There is no way to do this from NVDA, so a feature request
> would need to be filed for Firefox.

Ok I'll ask mick perhaps he was already tallking about this with someone
because I mentioned it to him prewiously. Just to ensure the right place
for their feature requests is their bugtrracker, right?

Peter


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

James Teh-2
Peter Vágner wrote:
> Now I am a bit confused. So using ids is not the correct way to define
> samepage link destinations? We do have such construction in NVDA users
> guide.
You can use either the id attribute or an A tag with a name attribute;
e.g. <span id="foo"> and <a name="foo"> should have the same effect in
compliant browsers. The problem is that they have defined:
<div id="skip"><a href="#skip">Skip to main content</a></div>
... lots of other stuff here ...
<a name="skip"></a>
... main content here ...
So they have defined both an id of skip and an A name of skip. Firefox
jumps to the first one, which is simply the div around the link itself.
When it is working correctly, hitting enter on that link will drop you
on to the content after the div, which is the search field.

> I think when this can't be sorted I'd rather have samepage links working
> than automatic say all when the document is loaded.
It isn't just say all that is the problem. We need to speak the document
when it gains focus so that the user hears something when tabbing away
from the location bar, but speaking the document when it gains focus
will always cause problems for same page links, among other things. I
still haven't quite got a good solution to this.

>Just to ensure the right place
> for [Mozilla] feature requests is their bugtrracker, right?
Correct.

Regarding the title attribute on images, it seems that Firefox does
expose it as the description if the alt attribute is undefined, but does
not expose it at all if the alt attribute is empty. This really doesn't
make any sense to me. :)

Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

Peter Vágner
In reply to this post by Peter Vágner
Hello,

Peter Vágner  wrote:
> Additionally do such links work in firefox it-self (for sighted people
> when NVDA is not runing)?
>
yes they work. I have checked with my friend today.

>> Anyway, there is currently another problem with same page links in NVDA.
>> A same page link often causes the focus to hit the document and at
>> present, NVDA performs a say all when the document receives focus. This
>> then causes the caret to move to the top of the document. I'm trying to
>> think of some better logic for handling say all on documents; we really
>> shouldn't perform a say all just because the focus hits the document.
>>
> I think when this can't be sorted I'd rather have samepage links working
> than automatic say all when the document is loaded.
>
Now I have tryed to change the line which "jumps" to the top and it
seems to be working great for me. Instead POSITION_First I am trying to
use POSITION_CARET while creating textInfo for the sayAllHandler. It
only breaks with websites which set focus to some other control e.g.
google search. Anyway I prefer to have it this way when same page links
are working and when virtual buffer starts where the real caret is.
Still perhaps there are situations I can't think of so I am just trying
to discuss it instead committing the change.
Patch is attached in case I am explaining it wrong.

thanks

Peter

Index: virtualBuffers/gecko_ia2.py
===================================================================
--- virtualBuffers/gecko_ia2.py (revision 1895)
+++ virtualBuffers/gecko_ia2.py (working copy)
@@ -110,7 +110,7 @@
  return nextHandler()
  speech.cancelSpeech()
  speech.speakObjectProperties(obj,name=True,role=True)
- info=self.makeTextInfo(textHandler.POSITION_FIRST)
+ info=self.makeTextInfo(textHandler.POSITION_CARET)
  sayAllHandler.readText(info,sayAllHandler.CURSOR_CARET)
  return
  if obj.role==controlTypes.ROLE_DOCUMENT and not self.passThrough:
Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] new GeckoIA2 virtual buffer - samepage links and graphics

James Teh-2
Peter Vágner wrote:
> Peter Vágner wrote:
>> Additionally do such links work in firefox it-self (for sighted people
>> when NVDA is not runing)?
> yes they work. I have checked with my friend today.
I am going to wager the "Skip to main content" link on
www.freedomscientific.com doesn't work, though.

>> I think when this can't be sorted I'd rather have samepage links working
>> than automatic say all when the document is loaded.
> Now I have tryed to change the line which "jumps" to the top and it
> seems to be working great for me. Instead POSITION_First I am trying to
> use POSITION_CARET while creating textInfo for the sayAllHandler. It
> only breaks with websites which set focus to some other control e.g.
> google search.
The focus should take precedence over the say all. Say all should only
happen if focus was not set to some specific control already.
 > Anyway I prefer to have it this way when same page links
> are working and when virtual buffer starts where the real caret is.
The "real" caret is the virtual buffer caret and I am not sure how it is
initialised by default. It probably gets set to the top of the document
internally, but really, we shouldn't be doing a say all from the caret
position. I'm not suggesting that this bug doesn't need to be fixed; it
does. I just don't think this is quite the right solution, although it
may be a work around for now.

Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh