Skip to content

Magnifier: treat focus and caret separately #20360

Description

@SaschaCowley

Is your feature request related to a problem? Please describe

The magnifier currently treats the system focus and the caret as synonymous. This is not accurate:

  • The system focus refers to the UI control that currently has focus (button, menu item, text control etc)
  • The caret refers to the text insertion point. While this will be in the system focus, not all controls have a caret, and the caret is a much more specific point than an entire control.

This causes two problems:

  1. Every attempt the magnifier makes to get the focus starts out by attempting to get the caret. In perhaps the majority of cases, this fails, as the focus has no caret. This is inefficient, and spams the log with errors (gated behind the magnifier debug logging category once Gate most debug logging calls in the magnifier behind config.conf['debugLog']['magnifier'] #20354 is merged)
  2. It doesn't give the user the flexibility to choose whether the magnifier follows the caret independently of the system focus. This functionality is offered by Windows Magnifier, (if memory serves) the magnifier in Kompiz, and presumably other magnification solutions.

Describe the solution you'd like

Treat the system focus and caret as separate tracking targets. Expose a further tracking target checkbox for the caret. Refactor the tracking code to track the caret independently of the system focus. Most likely, caret tracking can be gated behind the current control logically having an IP (I.E. it is editable or an ancestor of an editable element).

Describe alternatives you've considered

Don't

Additional context

#20354, #20282

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature/magnifierp4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions