Skip to content

Expose available UIA patterns in developer info#7992

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
BabbageCom:availableUIAPatterns
Mar 6, 2018
Merged

Expose available UIA patterns in developer info#7992
michaelDCurran merged 3 commits into
nvaccess:masterfrom
BabbageCom:availableUIAPatterns

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Feb 12, 2018

Copy link
Copy Markdown
Collaborator

Link to issue number:

Closes #5712

Summary of the issue:

As @dave090679, it would be helpful to have available UIA patterns in the developer info for easier inspection of available UIA patterns.

Description of how this pull request fixes the issue:

This is based on @dave090679's proposal, but it also does some things a bit different.

  1. It evaluates all UIAHandler.UIA_Is*PatternAvailablePropertyId constants on the UIAHandler. This means that this code doesn't have to be updated when new patterns become available.
  2. Rather than fetching every property in a separate call, this uses UIA._prefetchUIACacheForPropertyIDs to request all properties in one cache request.

Testing performed:

Tested fetching developer info on Windows 10 X64 and in a Win7x86 vm. See also the discussion with @josephsl in #5712. Concerns regarding compatibility with older versions of Windows 10 should be taken care of.

Known issues with pull request:

None

Example output

  • A list item in Windows Explorer
    • UIA patterns available: LegacyIAccessiblePattern, InvokePattern, ScrollItemPattern, SelectionItemPattern, ValuePattern
  • A table item in the Outlook 2016 inbox
    • UIA patterns available: LegacyIAccessiblePattern, GridItemPattern, InvokePattern, ScrollItemPattern, SelectionItemPattern, ValuePattern
  • The wifi toggle button in Windows 10 wifi settings
    • UIA patterns available: LegacyIAccessiblePattern, ScrollItemPattern, TogglePattern

Change log entry:

Leonard de Ruijter added 2 commits February 12, 2018 12:10
Comment thread source/NVDAObjects/UIA/__init__.py Outdated
cacheRequest.addProperty(ID)
except COMError:
log.debug("Couldn't add property ID %d to cache request, most likely unsupported on this version of Windows"%ID)
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you can remove this line, as after catching this exception, the for loop will continue anyway. Thanks.

@josephsl josephsl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi,

Looks fine to me (at least). Thanks for addressing review actions.

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please add some example output to the description of this PR. Otherwise this looks good.

feerrenrut added a commit that referenced this pull request Feb 14, 2018
Merge remote-tracking branch 'origin/pr/7992' into next
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Edited the description as requested.

@michaelDCurran michaelDCurran merged commit 86662d7 into nvaccess:master Mar 6, 2018
@nvaccessAuto nvaccessAuto added this to the 2018.1 milestone Mar 6, 2018
@michaelDCurran michaelDCurran modified the milestones: 2018.1, 2018.2 Mar 13, 2018
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V. quick fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

include a list of supported UIA patterns into the developer info

5 participants