nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 636 forks source link

Reads href after clicking on anchor tag in Firefox #6573

Closed DzmitryAlifer closed 5 years ago

DzmitryAlifer commented 7 years ago

I have this item on a page <a role="option" href="[looong url]">My Item</a>

After clicking on this item in Firefox in regular mode NVDA reads:

document busy [looong url from browser's address bar] application My Item

When I click on the item again it doesn't read the url (desired behavior):

document busy blank application My Item

In the meantime when I do the same thing in Firefox in private mode it reads every time as expected:

document busy blank application My Item

Is that an expected difference in FF behavior for regular and private modes?

feerrenrut commented 7 years ago

@jcsteh What are your thoughts here?

jcsteh commented 7 years ago

I can't reproduce this with the following steps:

  1. Open this URL: data:text/html,<a href="http://google.com/blah" role="option">Go</a>
  2. Click "Go".

I never hear a URL get announced. It'd be good if you could provide a test case which reproduces this.

feerrenrut commented 7 years ago

To be clear @jcsteh. There is not any expected differences between private and non-private browsing in Firefox?

I seem to be able to reproduce this with FireFox 49.0.2 using the following steps to reproduce:

  1. Open this URL: data:text/html,<a href="http://google.com" role="option">Go</a>
  2. Click "Go".

Notice that the link is now a page that exists.

Then (copied from speech viewer) I get:

document
Mozilla Firefox
http://192.168.185.20:8080/CustomerInfo/Customer?mdn=6288219260693&user-agent=Samsung&url=http%3A%2F%2Fgoogle.com%2F&lac=2205&ci=57604895&mode=444  busy
http://192.168.185.20:8080/CustomerInfo/Customer?mdn=6288219260693&user-agent=Samsung&url=http%3A%2F
%2Fgoogle.com%2F&lac=2205&ci=57604895&mode=444
Google  busy
link
Screen-reader users, click here to turn off Google Instant.

I'm not sure where that URL is coming from. Interestingly once I have done this once the URL part is not reported again. If I clear my recent history it does happen again. My guess is that there is a permanent redirect on http://google.com. Since I'm in Indonesia, I get redirected to https://www.google.co.id

Running this again, with network monitoring on within Firefox developer tools, I do get a response status code of 302.

This URL is not reported in private mode.

If I change the "go" link to point to https://www.google.com I also do not get the URL reported.

After updating to FireFox 50.0 I no longer see this behaviour.

I assume that this happened during the redirect because firefox triggers two page load events. One for the redirect (indeed I was seeing a number show on the screen for a fraction of a second, too quick to read) and then the resulting page. If the first page load does not have a page title, the URL is used instead?

jcsteh commented 7 years ago

I'm not aware of any differences between private and normal browsing that should cause this, no.

@DzmitryAlifer, what version of Firefox were you testing this with?

DzmitryAlifer commented 7 years ago

@jcsteh I've updated Firefox from 49.0.2 to 50.0 and I'm still able to reproduce it.

feerrenrut commented 7 years ago

@DzmitryAlifer could you give us an example which reproduces it for you in Firefox 50.0?

DzmitryAlifer commented 7 years ago

@feerrenrut here is the full example of one of the items

<a  ng-if="::!menuItemVM.config.isNested" 
      ng-href="attendance#/dataView?pageId=502" id="502_link" 
      title="Attendance" 
      ng-click="menuItemVM.selectMenuLink()" 
      class="selected" 
      tabindex="0" 
      ng-class="{'selected': menuItemVM.config.isSelected}" 
      role="option" 
      aria-setsize="2" 
      aria-posinset="2" 
      aria-labelledby="502_text" 
      aria-selected="true"  
      ng-attr-target="{{::menuItemVM.target}}" 
      automation-id="attendanceMenuLink" 
      href="attendance#/dataView?pageId=502">
           <span id="502_text" ng-if="::menuItemVM.config.text">Attendance</span>
</a>

And when the URL is being pronounced by NVDA in Firefox it spells all the adress bar value like this:

[application name] document busy http://[domain-name]/attendance#/dataView?pageId=502 application

DzmitryAlifer commented 7 years ago

Hello guys! Do you have any updates regarding this issue?

Am I right that different NVDA's behavior in different FF's modes (regular mode / private mode) is a FF's issue and not screen-reader's issue?

feerrenrut commented 7 years ago

Sorry @DzmitryAlifer I am not able to reproduce this issue using your example. I have to set a valid href URL, and remove all the angular specific stuff (eg ng-if) because I do not have an angular project set up. This leaves me with the following which does not reproduce the issue for me:

data:text/html,<a id="502_link" title="Attendance" class="selected" tabindex="0" role="option" aria-setsize="2" aria-posinset="2" aria-labelledby="502_text" aria-selected="true" automation-id="attendanceMenuLink" href="https://www.google.com"> <span id="502_text" >Attendance</span> </a>

If you could provide a test case that reproduces this issue that can be pasted into the address bar without relying on external dependencies that would really help us out when looking at this issue. This issue is likely caused by something in firefox, for us to look into this and perhaps raise a bug with them we really need a solid repo case.

Something in the form data:text/html,<body>Your example here</body>

ehollig commented 6 years ago

I am not able to reproduce this issue with the example provided in https://github.com/nvaccess/nvda/issues/6573#issuecomment-262920009. @DzmitryAlifer, is this still an issue with Firefox, and if so, could you provide a working example without the angular specific stuff and a valid href URL?

Adriani90 commented 5 years ago

@DzmitryAlifer are you still having this issue in Firefox 65.0.2 with NVDA 2019.1 RC^1?

Adriani90 commented 5 years ago

It seems the initial author is unfortunately not available anymore. We didn't get a response since three years. I am closing this issue. If we get the requested information from the author, we can reopen the issue. Thanks.