Skip to content

Roles not spoken for certain focused objects when role property called in chooseNVDAObjectOverlayClasses #2569

@nvaccessAuto

Description

@nvaccessAuto

Reported by jteh on 2012-07-30 10:43
Str:

  1. Create a global plugin containing the following code:
import globalPluginHandler

class GlobalPlugin(globalPluginHandler.GlobalPlugin):
    def chooseNVDAObjectOverlayClasses(self, obj, clsList):
        obj.role
  1. Restart NVDA.
  2. Open a Windows command console.
  3. Expected: NVDA should say terminal after announcing the console's title.
  4. Actual: Only the title is announced.

This also happens for Scintilla editor controls.

I suspect this is because the role gets cached on the instance during the choosing of overlay classes and the cache isn't invalidated until the next core cycle. However, role is overridden by the overlay classes, thus making the cached value incorrect. To solve this, we could simply invalidate the cache after applying overlay classes. This would unfortunately often cause more cross-process calls, but I'm not sure there's anything else we can do to fix this.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions