Topics

where is the object ChromeVbuf

Andy B.
 

Hi,

I am trying to implement a feature that allows a user to turn DTK features on while focused on an object in web content. DTK should then grab the object the cursor is located at and use that object as the starting point for exploring the UI in DTK mode. The current behavior of DTK is to drop the user on the first focusable object on the page. If there is a form present, the default focusable object is the first edit field on the page. www.google.com is a good example. Otherwise, the user is focused on the document root, dive, or other object in which NVDA can navigate to. If the cursor is placed on some text inside of a div for example, NVDA resorts to grabbing the dive containing the text, not the text itself. To provide a workaround for this problem, I need to know where the object ChromeVBuf is located in NVDA's api.

derek riemer
 

What's ChromeVBuf?
Chrome and firefox both use the same vBuff backend and bindings.


On Wed, Nov 27, 2019 at 8:16 AM Andy B. <sonfire11@...> wrote:
Hi,

I am trying to implement a feature that allows a user to turn DTK features on while focused on an object in web content. DTK should then grab the object the cursor is located at and use that object as the starting point for exploring the UI in DTK mode. The current behavior of DTK is to drop the user on the first focusable object on the page. If there is a form present, the default focusable object is the first edit field on the page. www.google.com is a good example. Otherwise, the user is focused on the document root, dive, or other object in which NVDA can navigate to. If the cursor is placed on some text inside of a div for example, NVDA resorts to grabbing the dive containing the text, not the text itself. To provide a workaround for this problem, I need to know where the object ChromeVBuf is located in NVDA's api.



--
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




 

Hi,

Technically, no – although virtual buffer code is abstract enough, Firefox and Chrome/Chromium Edge get their “concrete” power from Gecko and Chromium buffer backend, respectively. To add-on authors, it doesn’t really matter which virtual buffer implementation is in use.

Cheers,

Joseph

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of derek riemer
Sent: Saturday, November 30, 2019 12:28 PM
To: nvda-addons@nvda-addons.groups.io Group Moderators <nvda-addons@nvda-addons.groups.io>
Subject: Re: [nvda-addons] where is the object ChromeVbuf

 

What's ChromeVBuf?

Chrome and firefox both use the same vBuff backend and bindings.

 

On Wed, Nov 27, 2019 at 8:16 AM Andy B. <sonfire11@...> wrote:

Hi,

 

I am trying to implement a feature that allows a user to turn DTK features on while focused on an object in web content. DTK should then grab the object the cursor is located at and use that object as the starting point for exploring the UI in DTK mode. The current behavior of DTK is to drop the user on the first focusable object on the page. If there is a form present, the default focusable object is the first edit field on the page. www.google.com is a good example. Otherwise, the user is focused on the document root, dive, or other object in which NVDA can navigate to. If the cursor is placed on some text inside of a div for example, NVDA resorts to grabbing the dive containing the text, not the text itself. To provide a workaround for this problem, I need to know where the object ChromeVBuf is located in NVDA's api.

 



--

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



Andy B.
 

Hi,

I have no idea what a ChromeVBuf is until the NVDA log spit out the following error:

Attribute error: object ChromeVBuf has no attribute called 'name'. shared.navigateTo, line 75...

In my globalPlugin.__init__() function, I have the following snip of code.

focus = api.getCaretObject() #Attempt to get the object at the caret.
......
if shared.isEnabled():
    shared.NavigateTo(focus)
...
...

Later in shared.NavigateTo(obj), I have this line:
message = u'{} ({})'.format(focus.name, getRole(focus))

The issue arises from a user who wants DTK to remain on the current caret's position when he turns it on. At this point, DTK will automatically place its focus on the current container such as a, h1, h2, h3..., div, span, p, and so on. If the system caret is on something else, such as plain text, DTK's focus resorts to the first available object or form field that has isFocusable set to True. In most cases, the first object on the page that has isFocusable set to True is the body or root element of the document. On google.com, the first available object where isFocusable is set to True is the search field since there is something forcing the caret to that location. The best I can do is put focus on the most immediate ancestor of the nonfocusable object. For example, consider the following code:

<div id="container">
This is a container.
</div>

In theory, DTK should have the ability to set its focus to the string of text located inside the div because DTK can already navigate to strings of text such as this one. However, the best DTK can get at this point is to put focus on the parent div (id=container) in the above example. This goes to say that any text should have a container such as a span, h1, h2, h3..., image, a, and so on. Best practice is not to put plain old text anywhere outside of a container of some sort. Thanks for the help. I think DTK will resort to the immediate ancestor of the caret if it can't gain focus. Otherwise, give the caret focus.

On Sat, Nov 30, 2019 at 3:27 PM derek riemer <driemer.riemer@...> wrote:
What's ChromeVBuf?
Chrome and firefox both use the same vBuff backend and bindings.

On Wed, Nov 27, 2019 at 8:16 AM Andy B. <sonfire11@...> wrote:
Hi,

I am trying to implement a feature that allows a user to turn DTK features on while focused on an object in web content. DTK should then grab the object the cursor is located at and use that object as the starting point for exploring the UI in DTK mode. The current behavior of DTK is to drop the user on the first focusable object on the page. If there is a form present, the default focusable object is the first edit field on the page. www.google.com is a good example. Otherwise, the user is focused on the document root, dive, or other object in which NVDA can navigate to. If the cursor is placed on some text inside of a div for example, NVDA resorts to grabbing the dive containing the text, not the text itself. To provide a workaround for this problem, I need to know where the object ChromeVBuf is located in NVDA's api.



--
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




Andy B.
 

Hi,

First, if ChromeVBuf isn't an object in NVDA's ecosystem, where is the NVDA log/Python getting the object name from? Second, it might make some difference what vbuf we are working with. Consider the problem of Chrome not providing color/backcolor through its vbuf implementation, where Firefox does. You are right though... For most of DTKs features, all it needs to know is whether it is dealing with a web interface (browsemode) or a desktop environment.

On Sat, Nov 30, 2019 at 3:37 PM Joseph Lee <joseph.lee22590@...> wrote:

Hi,

Technically, no – although virtual buffer code is abstract enough, Firefox and Chrome/Chromium Edge get their “concrete” power from Gecko and Chromium buffer backend, respectively. To add-on authors, it doesn’t really matter which virtual buffer implementation is in use.

Cheers,

Joseph

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of derek riemer
Sent: Saturday, November 30, 2019 12:28 PM
To: nvda-addons@nvda-addons.groups.io Group Moderators <nvda-addons@nvda-addons.groups.io>
Subject: Re: [nvda-addons] where is the object ChromeVbuf

 

What's ChromeVBuf?

Chrome and firefox both use the same vBuff backend and bindings.

 

On Wed, Nov 27, 2019 at 8:16 AM Andy B. <sonfire11@...> wrote:

Hi,

 

I am trying to implement a feature that allows a user to turn DTK features on while focused on an object in web content. DTK should then grab the object the cursor is located at and use that object as the starting point for exploring the UI in DTK mode. The current behavior of DTK is to drop the user on the first focusable object on the page. If there is a form present, the default focusable object is the first edit field on the page. www.google.com is a good example. Otherwise, the user is focused on the document root, dive, or other object in which NVDA can navigate to. If the cursor is placed on some text inside of a div for example, NVDA resorts to grabbing the dive containing the text, not the text itself. To provide a workaround for this problem, I need to know where the object ChromeVBuf is located in NVDA's api.

 



--

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