Automatically announce selection changes in Delphi Grids and other inaccessible controls#8414
Closed
LeonarddeR wants to merge 11 commits into
Closed
Automatically announce selection changes in Delphi Grids and other inaccessible controls#8414LeonarddeR wants to merge 11 commits into
LeonarddeR wants to merge 11 commits into
Conversation
added 11 commits
November 19, 2018 10:32
Collaborator
Author
|
This pr is pretty big, it might be better to revisit this after the Python 3 transition and file it in some smaller bits, e.g.
|
Collaborator
|
I am labeling this as abandoned until someone takes this over. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Closes #7418
Summary of the issue:
In many legacy applications that have a bad accessibility implementation, we can still make these applications quite accessible using the display model. Even when an application does not fire focus events or doesn't implement accessibility API support, the display model can be used to find out what part of a window is relevant to report. An example of this is a Delphi Grid, where all information in the grid is only accessible by means of the display model, and in which case we can track the focus based on DrawFocusRect API calls. Even if DrawFocusRect isn't called, we can use the display model text info to find out what part of the window is considered selected and should therefore be reported.
Description of how this pull request fixes the issue:
This pr is split up into several area's which are more or less related to each other.
Changed behaviors structure
changes to documentBase and editableText
New behaviors
Enhanced display model selection offsets detection
Display model text info selection offsets detection was based on the background and foreground selection colors reported by Windows. This can give excelent results, but is somewhat limited as it doesn't allow detection of selection when the selection is communicated to the visual user in a different way, either by different colors or font attributes. Therefore, I borrowed the idea of property conditions from UIAUtils to create one or more conditions that should be met in order to have selection to be reported. To evaluate a condition, you can simply throw one or more condition dicts at the evaluateCondition method of a textInfos.Field instance.
To give some real life examples. I've seen several situations in the wild where selection had to be detected based on two different combinations of foreground and background color. There are also cases where the selection can be detected based on only the foreground color.
User visible changes
Testing performed:
Known issues with pull request:
Similar to terminal announcement behavior, the Selection based monitor is a bit limited in how it detects new selections and announces them. For example, when you select a list item that is continuously updating its value (e.g. when the selected item contains a counter) the whole item is repeated when the counter updates.
Change log entry: