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

Is there a way to dump a whole page as text file (the way NVDA perceives it, kind of like the speech viewer)? #5010

Closed
nvaccessAuto opened this issue Mar 31, 2015 · 30 comments

Comments

@nvaccessAuto
Copy link

Reported by jmuheim on 2015-03-31 11:50
I am a non-blind accessibility consultant, and I test a lot of websites using NVDA.

I usually forego the speech synthesiser functionalities of NVDA and rely on the speech log only, as I can see there much clearer and quicker what is relevant to me.

It's a bit cumbersome though to browse through pages again and again, so often times I wish I could simply dump the whole page content (the way NVDA perceives it) into a text file.

Is there something like this? Thank you.

@nvaccessAuto
Copy link
Author

Comment 1 by jmuheim on 2015-03-31 11:51
This sort of is similar to disabling CSS using Web developer toolbar in Firefox or Chrome, but still respecting display:none etc., the same way NVDA interprets it.

@nvaccessAuto
Copy link
Author

Comment 2 by Palacee_hun on 2015-04-01 10:43
Not a perfect solution, but maybe worth trying:
Press Ctrl+Home on the page you want to test to go to the top, then press NVDA+down arrow (continuous reading), wait a bit, then browse the output in speech viewer. If I am not mistaken, speech viewer should capture the whole page contents from top to bottom as NVDA sees it.

@nvaccessAuto
Copy link
Author

Comment 3 by jmuheim on 2015-04-01 10:49
This is what I'm doing right now. I hope there is a better solution. But thanks anyway.

@nvaccessAuto
Copy link
Author

Comment 4 by peter (in reply to comment 3) on 2015-04-01 20:16
you can press ctrl+a and ctrl+c in browser when nvda is running. Then paste the content of clipboard to some text editor.

@nvaccessAuto
Copy link
Author

Comment 5 by jmuheim on 2015-04-01 21:26
This is a good point. Still, it only copies the real text, and not all the additional info that NVDA provides (e.g. "link xy").

@nvaccessAuto
Copy link
Author

Comment 6 by jteh on 2015-04-01 21:58
There is no dedicated way to do this beyond the method suggested in comment:2. Implementing such would be tricky/kludgy at best. Regarding comment:2, if you set the speech synthesiser to no speech, the say all should complete fairly fast.
Changes:
Added labels: wontfix
State: closed

@nvaccessAuto
Copy link
Author

Comment 7 by jmuheim on 2015-04-02 07:16
We're getting close with this, thank you! Using NVDA+S, I can toggle speech mode to off, and then read aloud the whole page.

Two problems:

  1. I couldn't find out yet how to move the cursor to the beginning of the whole document, as I am on a Mac and running a virtual XP machine and the Mac keyboard doesn't have a Home key.

  2. When pressing NVDA+DownArrow (which should read all, as written here: http://webaim.org/resources/shortcuts/nvda), no everything is read aloud, but only some part of the page. Is there maybe a limit/threshold which I can remove or increase?

@nvaccessAuto
Copy link
Author

Comment 8 by mohammed on 2015-04-02 07:26
I think on a mac you can use the function key with the up arrow to simulate home.
the command for say all, is nvda plus a in the laptop layout. what keyboard layout are you using? Preferences / keyboard.

@nvaccessAuto
Copy link
Author

Comment 9 by jmuheim on 2015-04-02 07:39
Function+UpArrow works! Nice.

I have switched to keyboard layout, now NVDA+A reads everything. But the problem is still the same: not the whole page is read, only maybe 100-150 characters. I investigated further:

  • When speech mode is off or beep, then those 100-150 chars long part of the document is displayed in the speech viewer, and nothing more.
  • When speech mode is speech, then after whenever a line of those 150-150 chars long part of the document is read, a new line appears in the speech viewer. So in the end, the full document is read, and the speech viewer is always 100-150 chars ahead from the speech, but I still have to wait a long time until the full document is displayed in the speech viewer.

@nvaccessAuto
Copy link
Author

Comment 10 by jteh on 2015-04-02 11:11
Try setting your synthesiser to "no speech" in NVDA menu -> Preferences -> Synthesizer. This is a bit different to having speech mode set to off, though i agree this difference is counter-intuitive and probably needs to be made more sane. :)

@nvaccessAuto
Copy link
Author

Comment 11 by jmuheim on 2015-04-02 11:19
This has the same effect for me.

@nvaccessAuto
Copy link
Author

Comment 12 by jteh on 2015-04-02 11:24
Did you use the No speech synthesizer with speech mode set to speech or off? You'll need to use the No speech synthesizer with speech mode set to on.

@nvaccessAuto
Copy link
Author

Comment 13 by jmuheim on 2015-04-02 11:31
THAT'S IT! :-)

Great, thank you. So for the logs:

  • Display the NVDA Speech Viewer (NVDA+N, T, S)
  • Set synthesiser to 'no speech' (NVDA+N, P, S)
  • Set speech mode to 'speech' (NVDA+S multiple times)
  • Go to beginning of document (Home multiple times)
  • Read whole document (NVDA+A)

Then simply grab the output from the speech viewer.

@nvaccessAuto
Copy link
Author

Comment 14 by jteh (in reply to comment 13) on 2015-04-02 11:37
Replying to jmuheim:

  • Go to beginning of document (Home multiple times)

Control+home should go there in one jump. However, for you, this depends on whether you can manage this; i.e. whether control+fn+up correctly maps to control+home.

@nvaccessAuto
Copy link
Author

Comment 15 by jmuheim on 2015-04-02 11:42
I already tried this out, but this switched Firefox tabs for me. Thanks anyway for pointing it out!

@nvaccessAuto
Copy link
Author

Comment 16 by Palacee_hun (in reply to comment 15) on 2015-04-04 17:38
Replying to jmuheim:

I already tried this out, but this switched Firefox tabs for me. Thanks anyway for pointing it out!

The MAC equivalent of Home key is FN+Left arrow, so to go to the top of the page please press Ctrl+FN+Left arrow.

@nvaccessAuto
Copy link
Author

Comment 17 by jmuheim on 2015-04-09 07:13

The MAC equivalent of Home key is FN+Left arrow, so to go to the top of the page please press Ctrl+FN+Left arrow.

This doesn't work for me, but it's OK as I simply press Fn+Up multiple times.

@nvaccessAuto
Copy link
Author

Comment 18 by jmuheim on 2015-04-09 07:16
Just for the sake of completion...

I recently stumbled over the '''Fangs screenreader emulator extension''' for Firefox recently:

https://addons.mozilla.org/en-US/firefox/addon/fangs-screen-reader-emulator/

It does quite what I wanted to achieve with NVDA. It's not bug free, and it's not under active development anymore, but it's ok to quickly check out the linear representation of a website similar to how a screenreader would represent it. (As a Mac user, it's much faster to load a Firefox extension instead of launching a virtual pc with Windows and NVDA).

@ghost
Copy link

ghost commented Nov 10, 2017

NVDA-Speech-Viewer-dump is automatically created using python code
https://github.com/mahilkr/NVDA-Speech-Viewer-dump

@jmuheim
Copy link

jmuheim commented Nov 10, 2017

@mahilkr this sounds awesome! I don't really see how I can use it. An add-on that saves the full output of a session when quitting NVDA would be great.

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 11, 2017 via email

@ghost
Copy link

ghost commented Nov 11, 2017

NVDA-Speech-Viewer-dump is automatically created using python code
https://github.com/mahilkr/NVDA-Speech-Viewer-dump

my_script.py code is enough to fetch and save as text file
Commandline method:
python file_name file_path
file_name :The pycode
file_path : Path for the output file to be saved as text file

Example : python my_script.py "C:\Automation\src\data\output.txt"

use any language to call the specified py script inorder to fetch speech viewer.

@jmuheim
Copy link

jmuheim commented Nov 13, 2017

Excuse my naivity, but do I have to install python first?

@ghost
Copy link

ghost commented Nov 13, 2017

Yeah. Python 2.7
Pywin2 for Python 2.7
Set Python Path to system environment path

@saranapp
Copy link

saranapp commented Jul 9, 2018

Hello,
The my_script.py script is inaccessible. Do you have the current link to the resource?

Thanks,
Saran

@Shridevihonnutagi
Copy link

Heloo,
Is there a way to Copy only Current Spoken Text.

@ehollig
Copy link
Collaborator

ehollig commented Oct 24, 2018

@Shridevihonnutagi you can perform the following steps if you do not want audible speech. If you still would like speech, you can stop after step 1:
• Display the NVDA Speech Viewer (NVDA+N, T, S)
• Set synthesiser to 'no speech' (NVDA+CTRL+S, End, Enter)
• Set speech mode to 'speech' (NVDA+S multiple times)
• Go to beginning of document (CTRL+Home)
• Read whole document (NVDA+A)
Then simply grab the output from the speech viewer.
Steps slightly modified from #5010 (comment)

@bkemmer
Copy link

bkemmer commented May 14, 2020

Hi there!

Anyone still have the python code to dump Speech Viewer output to a file?

This repository is offline: https://github.com/mahilkr/NVDA-Speech-Viewer-dump
@asaranprasad ?

@Bharath369-hub
Copy link

Hi,

is there any way to dump Speech Viewer output to a file?

repository : https://github.com/mahilkr/NVDA-Speech-Viewer-dump is unavailbale

@krmahil
Copy link

krmahil commented Mar 10, 2021

@mahilkr was my older account.
Just wanted to mention the steps again:

Let JAWS screen reader read your accessibility while you perform accessibility scenario on web.
create a python script that can read entire text from the screen reader window.
then save it to a path.
then you can validate the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants