Topics

NVDA - Get the input with nvda shortcut keys

vimuths@...
 

When we create a simple web page and read this line with NVDA shortcut key H it will be read as
"Flash Sale heading level three"

<h3 class="hp-mod-card-title">Flash Sale</h3>

But is there a way to assign this Flash Sale to a python variable?. Really sorry I'm bit new to this.

import globalPluginHandler
import ui

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

        def script_sayHeader(self, gesture):
                x = "Header 123"
                ui.message(x + 'is a nice header')

        __gestures={
                "kb:h":"sayHeader"
        }

This is the code for a global plugin I created and I need to add a current header or shortcut key value to this x. This is a sample code and what I intend to do is a bit complicated.

Travis Siegel
 

What are you trying to accomplish.  I see no value in assigning web headers to python variables.  Is there a specific purpose you're trying to do this? Or are you just experimenting to see if something can be done.  Honestly, I see no value at all in assigning web content to python variables.  The only thing I can think of for this type of behavior is to over ride what NVDA reads, and that can be accomplished more easily by proper web design rather than scripting the screen reader.  This is something folks constantly try to do on OSX, and every time I advise them to let the screen reader do the task it's designed for, and simply design your programs to do what they should instead of trying to force the screen reader to do what you want.  Not every user is going to use the screen reader the same way, and if you hijack the screen reader to make it do something it isn't designed to do just because you think it's cool or interesting, you may find no screen reader users will use your program/site, because you make it difficult for them to get the information they want when they want it.

On 7/9/2019 2:43 PM, vimuths via Groups.Io wrote:
When we create a simple web page and read this line with NVDA shortcut key H it will be read as
"Flash Sale heading level three"

<h3 class="hp-mod-card-title">Flash Sale</h3>

But is there a way to assign this Flash Sale to a python variable?. Really sorry I'm bit new to this.

import globalPluginHandler
import ui

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

        def script_sayHeader(self, gesture):
                x = "Header 123"
                ui.message(x + 'is a nice header')

        __gestures={
                "kb:h":"sayHeader"
        }

This is the code for a global plugin I created and I need to add a current header or shortcut key value to this x. This is a sample code and what I intend to do is a bit complicated.


Virus-free. www.avast.com

vimuths@...
 

I need to create a plugin which make online e commerce sites more readable. This is just an example. for an example

we can't find the right value here since they nvda not read the strike through. I found few issues like this. So it will be great help if I can know is there a way to get the content of a NVDA shortcut key.

James Scholes
 

The ability to make a website more accessible via NVDA add-ons is limited. If you need to make a website more accessible which is not under your control, it would be better to create either a userscript or a browser extension. This is assuming that you have already contacted the owners of the website and attempted a dialog with the aim of improving the accessibility at source.

Regards,

James Scholes

On 10/07/2019 at 4:42 am, vimuths via Groups.Io wrote:
I need to create a plugin which make online e commerce sites more readable. This is just an example. for an example
we can't find the right value here since they nvda not read the strike through. I found few issues like this. So it will be great help if I can know is there a way to get the content of a *NVDA shortcut key.*

vimuths@...
 

I'm not familier with the term user scripts. Is there any tutorials?

James Scholes
 

There is a lot of information on the web about userscripts and browser extensions, including tutorials. You will need to know JavaScript and HTML, and potentially will also need to be familiar with ARIA concepts.

Regards,

James Scholes

On 10/07/2019 at 12:43 pm, vimuths via Groups.Io wrote:
I'm not familier with the term user scripts. Is there any tutorials?

derek riemer
 

Please note that NVDA already supports strikethrough. You need to configure it through the document formatting settings, and it's off by default to keep users from being spammed by needless information.

On Tue, Jul 9, 2019 at 1:51 PM vimuths via Groups.Io <vimuths=yahoo.com@groups.io> wrote:
When we create a simple web page and read this line with NVDA shortcut key H it will be read as
"Flash Sale heading level three"

<h3 class="hp-mod-card-title">Flash Sale</h3>

But is there a way to assign this Flash Sale to a python variable?. Really sorry I'm bit new to this.

import globalPluginHandler
import ui

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

        def script_sayHeader(self, gesture):
                x = "Header 123"
                ui.message(x + 'is a nice header')

        __gestures={
                "kb:h":"sayHeader"
        }

This is the code for a global plugin I created and I need to add a current header or shortcut key value to this x. This is a sample code and what I intend to do is a bit complicated.



--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com




derek riemer
 

In your original message, x is a local variable, so if you assign something to it, it will automatically be destroyed when the function goes out of scope. If you don't know what I'm talking about, I'd advise doing some python tutorials first, because addon development requires at least an intermediate, and probably closer to advanced knowledge of python. If you can do what you want without modifying the screen reader, you'll want to do so, because addon writing is far from a trivial undertaking.

On Sat, Jul 13, 2019 at 10:50 PM Derek Riemer <driemer.riemer@...> wrote:
Please note that NVDA already supports strikethrough. You need to configure it through the document formatting settings, and it's off by default to keep users from being spammed by needless information.

On Tue, Jul 9, 2019 at 1:51 PM vimuths via Groups.Io <vimuths=yahoo.com@groups.io> wrote:
When we create a simple web page and read this line with NVDA shortcut key H it will be read as
"Flash Sale heading level three"

<h3 class="hp-mod-card-title">Flash Sale</h3>

But is there a way to assign this Flash Sale to a python variable?. Really sorry I'm bit new to this.

import globalPluginHandler
import ui

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

        def script_sayHeader(self, gesture):
                x = "Header 123"
                ui.message(x + 'is a nice header')

        __gestures={
                "kb:h":"sayHeader"
        }

This is the code for a global plugin I created and I need to add a current header or shortcut key value to this x. This is a sample code and what I intend to do is a bit complicated.



--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com






--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com