Skip to content

JAB: nvda should not treat ActiveDescendentChange as a focus gained event #5989

Closed
@rpaquay

Description

@rpaquay

See code at

def internal_event_activeDescendantChange(vmID, event,source,oldDescendant,newDescendant):

When a PropertyActiveDescendentChange event is received, nvda transform it into a event_gainFocus event.

The issue is that PropertyActiveDescendentChange can be raised by components (e.g. tree view) that don't have the focus. In that case, a PropertyActiveDescendentChange does not imply that the newly selected tree node has received the focus.

Take for example IntelliJ/Android Studio. When the user typed code in the text editor for a source file, for example a Java source file, IntelliJ/Android Studio asynchronously updates a tree contained in the "Stucture" toolwindow. The "Structure" toolwindow essentially shows the list of methods/nested classes, etc. of the currently edited source file. One of the feature of the "Structure" toolwindow is that it makes the tree node corresponding to the current java method active in the tree view, so when the caret moves from one method to another, the active node is updated (asynchronously). Node that the editor keeps the focus the whole time, and the tree itself never receives the focus.

In this example, the problem with the current implementation of the PropertyActiveDescendentChange event handler in the example above is that nvda assumes the editor loses the focus when the event is received. From then one, nvda will then ignore caret events because it thinks the component with the focus is the tree view.

I think a reasonable fix would be to ignore PropertyActiveDescendentChange events unless the component sending the event (e.g. the tree) has the focus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions