Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Automation in Windows Console: add "API levels" as a better isImprovedTextRangeAvailable #12660

Merged
merged 4 commits into from Jul 22, 2021

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Jul 20, 2021

Link to issue number:

None.

Summary of the issue:

The Windows 11 inbox console will ship with most, but not all, fixes required to make UIA by default a good experience. However, a new conhost version will be delivered "out-of-box" including additional functionality and bug fixes. Therefore, isImprovedTextRangeAvailable (a boolean value) is now insufficient to express the range of possible UIA console versions now in the wild.

Description of how this pull request fixes the issue:

  • Adds an enumeration, WinConsoleAPILevel, with comments describing the meaning of each member.
  • Refactors NVDA's current code to use the new enum without changing current functionality. Functionality changes to follow in subsequent PRs.
  • Expose apiLevel in dev info to ease debugging.
  • Deprecate isImprovedTextRangeAvailable, but refactor it for now to use apiLevel.

Testing strategy:

Tested conhost versions meeting each API level and verified that the correct level was being set.

Known issues with pull request:

  • The FORMATTED level is intentionally unused in NVDA code, usage to follow in subsequent PRs.
    • FORMATTED consoles are correctly detected when run though.

Change log entries:

== Changes for Developers ==

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

@codeofdusk codeofdusk requested a review from a team as a code owner July 20, 2021 21:43
@codeofdusk codeofdusk requested a review from seanbudd July 20, 2021 21:43
@codeofdusk
Copy link
Contributor Author

Cc @carlos-zamora, @DHowett.

@codeofdusk
Copy link
Contributor Author

Also CC @seanbudd.

@seanbudd seanbudd self-assigned this Jul 21, 2021
@codeofdusk codeofdusk changed the base branch from master to beta July 21, 2021 06:32
@codeofdusk codeofdusk changed the base branch from beta to master July 21, 2021 06:35
@LeonarddeR
Copy link
Collaborator

Would it be possible to determine the correct behavior based on the version of conhost available on the system?

@codeofdusk
Copy link
Contributor Author

Would it be possible to determine the correct behavior based on the version of conhost available on the system?

According to the conhost devs, version number is no longer a reliable indicator of functionality.

codeofdusk and others added 3 commits July 21, 2021 03:34
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, looks good to me

@DHowett
Copy link

DHowett commented Jul 22, 2021

I think this is such a good way to do this. I'm always an advocate for feature detection rather than versioning, especially since Windows' servicing story makes it ... difficult to pin down precise time ranges 😄.

Thanks @codeofdusk!

@seanbudd seanbudd merged commit 5407954 into nvaccess:master Jul 22, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Jul 22, 2021
@codeofdusk codeofdusk deleted the cmduia-api-levels branch August 2, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants