Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVDA doesn't know a difference between Links and Same Page Links #141

Closed
nvaccessAuto opened this issue Jan 1, 2010 · 69 comments · Fixed by #16994
Closed

NVDA doesn't know a difference between Links and Same Page Links #141

nvaccessAuto opened this issue Jan 1, 2010 · 69 comments · Fixed by #16994
Labels
enhancement feature/browse-mode p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@nvaccessAuto
Copy link

Reported by hkatic on 2008-07-23 09:11
In virtual buffers, NVDA doesn't know a difference between external and same page links. So for example, any user including myself may be confuzed whyle viewing a Web page in FireFox for example where lots of links exist, because he or she may not know is this link going to another page or to any other place on the same page. So, it is required to make NVDA speaking "same page link" before any link which moves to a different part of the same page e.g. "same page link system requirements". The same applyes to FTP links and Send Mail links.
Blocking #3434, #5190

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2008-07-23 23:32
This will not be done for 0.6p2.

Currently, announcement of same page links is quite difficult to implement because Firefox does not provide an easy way for us to do this.

Also, consider the fact that most users who do not use a screen reader actually can't differentiate between different types of links without looking at the URL, unless the site marks them in some way. If a site uses a graphic to denote external links, this should be obvious to a screen reader user also. As far as I know, same page links, mailto links, etc. do not look any different to any other link unless they are styled differently.
Changes:
Milestone changed from 0.6p2 to None

@nvaccessAuto
Copy link
Author

Comment 2 by norrumar on 2011-02-12 12:44
I have used JAWS before NVDA, and JAWS announces different types of links: links on the same page, transfer files (ftp://), etc. I don't know how NVDA source code is built. But if the value of href attribute, in element, could be used, NVDA may announce, for instance, "Link on the same page" when href value begins: "#". I think that this enhancement would be useful.

@nvaccessAuto
Copy link
Author

Comment 4 by jteh on 2011-02-12 23:05
As noted in comment:1, I don't see why a screen reader should inform the user of this. Links don't look any different unless the site marks them differently (in which case this should be indicated in an alternative way for accessibility); they are just links. If this does get implemented, I certainly think it should be configurable and disabled by default.

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2011-02-12 23:14
@norrumar: Did you actually mean to accept this ticket or was that an error?

@nvaccessAuto
Copy link
Author

Comment 6 by norrumar on 2011-02-15 07:46
I don¡t know the meaning of accepting a ticket, excuse me. About the option for wnowing the types of links, I think that implementing it as a configurable option is a good idea. I thing also that a screen reader, sometimes, sould implement task or options, although they ar not provided using accesibility or visual properties, for example ARIA or css. Links that points to the same page can be often created due to accesibility (or usability), because they get an easier navigation. Hotkeys (accesskey) perhaps are not visible on web pages, and so some web sites include an accesibility page, where these keys are represented on a table. Furthermore, if you can see the screen, I think that knowing the type of a link is easier: if it's a link to the same page, you can see the content that is pointed by the link, and the link text can be a reference for knowing its type. Excuse me for my bad English. Here is a link to a WCAG 2.0 document, because I can't explain you better what want to say:
http://www.w3.org/WAI/WCAG20/quickref/#qr-navigation-mechanisms-skip

IThanks.

@nvaccessAuto
Copy link
Author

nvaccessAuto commented Apr 17, 2011

Attachment linkTypes.py added by norrumar on 2011-04-17 11:55
Description:
Global plugin for knowing the type of the focused link, in Spanish. It contains a script that can be activated pressing control+shift+a, and reads: Link with anchor (or to a part of the same page), mail link, FTP link or external destination. Messages and documentation in Spanish. Tested on Firefox.

Edit:
Attached file from old trac server. Please rename to linkTypes.py
linkTypes.py.txt

@nvaccessAuto
Copy link
Author

Comment 7 by norrumar (in reply to comment description) on 2011-04-17 12:44
Replying to hkatic:
I think that it would be useful that NVDA can read the type of link in virtual buffers without plugins, if possible. I have attached a plugin for this requirement, but You have to press control+shift+a, and when a link is focused, NVDA reads the type. I have developed the plugin in Spanish. If you are reading another element, not a link, and you press control+shift+a, NVDA could announce the type of the previous link, if it is focused although the cursor is not over that link. I have included five possible messages (in Spanish):

  • Anchor: If the destination is a part of the same or another document, usually the same.
  • Link to the same document.
  • Mail link.
  • FTP link.
  • External link: For links to external resources.
    Furthermore, this script can:
  • Announce the link URI, for instance: http://www.example.com#somewhere: Pressing control+shift+a two times.
  • Copy the URI to clipboard: Pressing control+shift+a three times.
    I have tested this plugin on Firefox, Internet Explorer 8 and Chrome. The script doesn't work on Chrome.

In virtual buffers, NVDA doesn't know a difference between external and same page links. So for example, any user including myself may be confuzed whyle viewing a Web page in FireFox for example where lots of links exist, because he or she may not know is this link going to another page or to any other place on the same page. So, it is required to make NVDA speaking "same page link" before any link which moves to a different part of the same page e.g. "same page link system requirements". The same applyes to FTP links and Send Mail links.

@nvaccessAuto
Copy link
Author

Comment 8 by jteh (in reply to comment 6) on 2013-02-13 07:47
Replying to norrumar:

I thing also that a screen reader, sometimes, sould implement task or options, although they ar not provided using accesibility or visual properties

I don't see why a screen reader should read anything that isn't available to any other user, sighted or otherwise.

Links that points to the same page can be often created due to accesibility (or usability), because they get an easier navigation.

True, but these always say "Skip to content", "Return to top" or whatever, so what they do is obvious from the text. Saying "same page link" is just unnecessary verbosity.

Hotkeys (accesskey) perhaps are not visible on web pages, and so some web sites include an accesibility page, where these keys are represented on a table.

I don't quite follow how this is related. If it's a separate page, it's not a same page link.

Furthermore, if you can see the screen, I think that knowing the type of a link is easier: if it's a link to the same page, you can see the content that is pointed by the link

You can't if the content isn't on the screen (i.e. you have to scroll), which is the primary use of same page links.

and the link text can be a reference for knowing its type.

That's also true for screen reader users: the text indicates what the link will do.

@nvaccessAuto
Copy link
Author

Comment 10 by mohammed on 2014-08-30 13:56
in page links (anchors) are almost always styled differently. Sighted developers or followers can correct me.

it's one part of NVDA that I couldn't get used to yet. I think differentiating between normal and in page links can make our lives easier. so consider this just a vote for implimenting this. if you're worried for verbosity we can probably wait until NVDA implements audio themes.

@mohammad-suliman
Copy link
Contributor

I am adding my voice for this to be included in NVDA... This will give users more consistent experience when switching from the mobile to the desktop and vise versa. Voiceover includes this functionality.
Thanks

@michelhebert
Copy link

I agree, this should be part of NVDA (even by default..I can't see a user not wanting to know the context of clicking a link). The main benefit of this enhancement, is to avoid confusing the user when the context changes. Clicking a link without context will definitely cause confusion/frustration for the user since it could open a new window/tab, open a mail client, download a file, jump to a section in the page etc..

It would definitely help with meeting WCAG 2.0 guideline 2.4 - Navigable

@jcsteh
Copy link
Contributor

jcsteh commented Nov 25, 2016 via email

@feerrenrut
Copy link
Contributor

feerrenrut commented Nov 27, 2016

As a sighted person I find often there is no easy way to differentiate in page links from regular links. I tend to hover the mouse on the link, and look at the link in the status bar. If its a #identifier I know. This probably does not apply to a more general population however.

I'm going to set the priority on this to priority 3. Since there is an add-on that provides this functionality already developed (However I'm not sure about the state of translations for this?).

@feerrenrut feerrenrut reopened this Nov 27, 2016
@feerrenrut feerrenrut added the p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority label Nov 27, 2016
@derekriemer
Copy link
Collaborator

derekriemer commented Nov 27, 2016 via email

@feerrenrut
Copy link
Contributor

@derekriemer I think so but I didn't actually look into it at all. One of the earlier comments (norrumar via trac) mentioned that they attached a plugin to do this.

@jcsteh could you dig up this attachment from trac and attach it here? Thanks!

@ehollig
Copy link
Collaborator

ehollig commented Aug 7, 2017

@feerrenrut or @jcsteh, could you dig up the attachment from trac and attach it here?

@feerrenrut
Copy link
Contributor

I have updated #141 (comment) with the file

@Adriani90
Copy link
Collaborator

@feerrenrut unfortunately I cannot find the file. Can you please update this? I think the addon is only in spanish and is kind of proof of concept. @jcsteh this functionality might give a blind person another feeling when navigating a website than a sighted person has. But we have to bare in mind that sighted people do find much easier and much faster content on the same page than a blind user. Especially on complex websites. They can simply scroll down the page. If not announcing same page links, then at least someone should be able to assign a quicknavigation key in browse mode for same page links. This makes it easier to find relevant contents on complex pages. And in fact, it should not be very hard to do it since same page links are clearly defined in the source code of the websites.

@derekriemer
Copy link
Collaborator

it should not be very hard to do it since same page links are clearly defined in the source code of the websites.

Actually, NVDA doesn't have access to the source code of websites in modern browsers (ff, chrome, edge). We use the accessibility tree, and various accessibility API's to get this info. Whether a link is same page or not may not be even given to our view of the world.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 12, 2024

As I said, I'm not diving into this argument. Pragmatically, a lot of users seem to want this, so I'm happy to provide guidance on how to implement it. I only re-stated my viewpoint because i do not want my willingness to help here to be seen as personal endorsement of the feature. But I don't have to endorse something to pragmatically acknowledge user demand.

This is going to require changes in the following places:

  1. In controlTypes, where we need to add a new state.
  2. In NVDAObjects.IAccessible.ia2Web.Ia2Web._get_states, where we need to get the accValue for the link, get the accValue for the document, compare them and set the new state if they're on the same page.
  3. In the gecko_ia2 virtual buffer backend (in C++), where we need to expose the accValue for links.
  4. In virtualBuffers.gecko_ia2.Gecko_ia2_TextInfo._normalizeControlField, where we need to do the same as 3), but use the accValue from the buffer. We should possibly have a common utility function in ia2Web to avoid as much code duplication as we can.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 12, 2024

One potential snag is that we need to get the document URL. Right now, I think the only cross-browser way to do this is to walk the ancestry to find the document, which is potentially slow. Firefox does provide a way to get the top level document, but that's not going to work for iframes, since same page is relative to the nearest ancestor document, not the top level document. And regardless, Chromium doesn't support that. I could fix that fairly easily in Firefox, but you'd need to convince Chromium to do the same.

Actually, even that isn't going to work for the virtual buffer. In the non-iframe case, you can use documentConstantIdentifier, which is cached for the core cycle. But that won't work for the iframe case. I guess we could include accValue for all documents in the buffer, but I don't think _normalizeControlField can get ancestor control fields.

@amirsol81
Copy link

amirsol81 commented Aug 12, 2024 via email

@rkingett
Copy link

What about distinguishing mailto links for now? I remember someone mentioning that above. I'm thinking we could do email links far easier than this for the moment because we could just pinpoint all mailto links? Or is that a ticket somewhere? I tried looking but was unable to find it.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 12, 2024

OK. I had thought about testing with _normalizeControlField and adding a new state in controlTypes, and about comparing the link value with documentConstantIdentifier.
But I didn't think about cases where documentConstantIdentifier is not enough, and I don't have experience working with C++.
Hope someone takes care of this.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 12, 2024

In case it's helpful, I'll start a draft pull request adding new states like: LINK_TYPE_INTERNAL, LINK_TYPE_EMAIL, LINK_TYPE_FTP, and adding these states in IA2web deppending on link values and link treeInterceptor.documentConstantIdentifier.
I won't finish all the work since, as mentioned, I don't have experience with C++.
I'll do it tomorrow and in the next days, unless someone sais that it's better that a unique person works on this.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 12, 2024

i would suggest that we keep the scope of this issue confined to same page links rather than trying to extend it to email and whatever else. This is already subject to some controversy as it is, so overscoping only decreases the chance of making progress.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 12, 2024

Thanks @jcsteh .
I've opened a draft pull request just addressing links to the same page.
I haven't added the changelog since it can be added later, when we know the authors of this pull request.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 14, 2024

I comment here, in addition to comments on the PR oriented to developers. since comments here will be read by a larger number of people.
I'm working on this, and after a pull request created by @LeonarddeR working in the gecko_ia2 virtual buffer backend an additional work from my side, same page links, at least in cases tested by me, are reported now, though the pull request is a draft. My comment is to point out that, as suggested by @jcsteh in a previous comment, my intention is to create a combo box that could be seen when the checkbox to report links is enabled in document formatting, to configure if same page links should be reported. This would be disabled by default.

@amirsol81
Copy link

@nvdaes Thanks for your efforts. Just one question: why do you intend to keep it disabled in the combo box? I think it should be enabled by default as it'll help more users or those who are familiar with JAWS and VoiceOver.

@XLTechie
Copy link
Collaborator

XLTechie commented Aug 14, 2024 via email

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 14, 2024

Hi @amirsol81: Though I'm in favour of implementing this feature as an option:

  • Sometimes we know that links are to the same page seeing the context, for example in tables of contents, like it happens in the NVDA user guide, or reading the label, for example when it is something like: "Up to the start of this page". In these cases announcing same page is verbose.
  • Old users of NVDA may prefer to keep the classic option. I remember, when I used JAWS years ago, that reporting of "same page" not always seemed accurate to me, though I use NVDA since 2010 and I don't know about JAWS and VoiceOver on Mac. So we shouldn't assume that this feature will always be perceived as an advantage.
  • I don't like the idea of making something just looking at other screen readers. The fact that something has been or is usual in certain screen readers is not a good argument for me, since I don't assume that they work better with these features.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 14, 2024

Anyway, I think that we can add an unassigned gesture to change this quickly.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 14, 2024

Sincerely, in these kind of things, I'm open and I understand the different points of views.
If many people prefer to have this by default, I'll suggest to do like that, though I'd vote for having this disabled by default.
After 14 years using NVDA, now I'm used to the classic behavior, and old users should also be considered.

@XLTechie
Copy link
Collaborator

XLTechie commented Aug 14, 2024 via email

@amirsol81
Copy link

@XLTechie Agree with you whole-heartedly! You eloquently outlined what I was about to write. I also think this, and most new NVDA features, should be enabled by default.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 14, 2024

Enabling this by default is been controversial. I'll ask also in the spanish community. I expect to commit changes related to this before my two weeks of hollidays (next Monday).

@CyrilleB79
Copy link
Collaborator

I am not personally expecting this feature and maybe I would disable it for myself. But the reason exposed by @XLTechie seems completely valid to me.

So unless someone expose a strong reason with evidences why this feature should be disabled, I'd vote to enable it. We may also enable it in alpha and disable it next according to first reactions.

@nvdaes
Copy link
Collaborator

nvdaes commented Aug 15, 2024

@seanbudd suggestedthat this should be enabled by default, as other booleans. This is done in the PR.
Thanks for your opinions.

@github-actions github-actions bot added this to the 2025.1 milestone Sep 6, 2024
@XLTechie
Copy link
Collaborator

XLTechie commented Sep 6, 2024 via email

@nvdaes
Copy link
Collaborator

nvdaes commented Sep 6, 2024

Thanks @XLTechie . I'm not sure if we should work on reporting also same page links, for example, for local files like the user guide. This works for http.
If so, we can discuss this in a different issue.

@amirsol81
Copy link

@nvdaes Please accept my congrats! I also think same page links should be announced in local files like, say, NVDA manual or CHM files.

@nvdaes
Copy link
Collaborator

nvdaes commented Sep 6, 2024

Thanks @amirsol81.
For people interested, I've opened issue #17127
Please add other feedback there since this issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature/browse-mode p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.