Emoji panel and clipboard history: locate correct items if controls are different due to recent changes#10378
Emoji panel and clipboard history: locate correct items if controls are different due to recent changes#10378josephsl wants to merge 8 commits into
Conversation
| # This event is properly raised in build 17134. | ||
| if winVersion.winVersion.build <= 17134 and childAutomationID in ("TEMPLATE_PART_ExpressiveInputFullViewFuntionBarItemControl", "TEMPLATE_PART_ExpressiveInputFullViewFuntionBarCloseButton"): | ||
| if ( | ||
| winVersion.winVersion.build <= 17134 |
There was a problem hiding this comment.
Could we use winVersion.isWin10 instead?
| if ( | ||
| winVersion.winVersion.build <= 17134 | ||
| and inputPanelAutomationID in ( | ||
| "TEMPLATE_PART_ExpressiveInputFullViewFuntionBarItemControl", |
There was a problem hiding this comment.
Could you store these in a constant?
| ): | ||
| try: | ||
| self.event_UIA_elementSelected(obj.firstChild.firstChild.firstChild, nextHandler) | ||
| self.event_UIA_elementSelected(inputPanel.firstChild.firstChild, nextHandler) |
There was a problem hiding this comment.
I'm curious what @michaelDCurran thinks here, but I'd prefer something like eventHandler.executeEvent instead. IN the current code, it is difficult to find out how the flow of events is.
| emojisList = emojisList.previous | ||
| try: | ||
| self.event_UIA_elementSelected(obj.firstChild.children[-2].firstChild.firstChild, nextHandler) | ||
| self.event_UIA_elementSelected(emojisList.firstChild.firstChild, nextHandler) |
| clipboardHistory = obj.children[-2] | ||
| if clipboardHistory.UIAElement.cachedAutomationID == inputPanelAutomationID: | ||
| clipboardHistory = clipboardHistory.next | ||
| self.event_UIA_elementSelected(clipboardHistory, nextHandler) |
|
Hi, I’ll experiment with executeEvent in the add-on today, and as for using isWin10, that’s something I’ve considered last weekend (and will do so). As for emoji panel constants in Version 1709 and 1803, yes, I’ll do so in a list. Thanks.
|
|
Hi, Deferred to after 2019.3 release. Thanks. |
|
Hi, Now that 2019.3 stable version is out, let's get this PR going again. Note that this PR might be influenced by a UIA IME branch being worked on by @michaelDCurran. Thanks. |
…s. Re nvaccess#10377. For ease of readability, rename childAutomationID to inputPanelAutomationID, and assign obj.firstChild to inputPanel to better communicate event traversals.
…and clipboard history can be announced. Re nvaccess#10377. In recent versions of emoji panel and clipboard history (particularly since may 2019 Update), something other than selected item is announced - for example, clipboard tip instead of most recently copied item, or emoji group rather than selected emoji (the latter leading to NVDA staying silent). Thus make sure to keep in mind by checking for UIA automation ID's for both old and new versions. moving to a different element if the automation ID is different from old releases.
… with indecies. Re nvaccess#10377.
…vents directly. Re nvaccess#10377. Reviewed by Leonard de Ruijter: try using eventHandler.executeEvent when firing UIA item selected event for various modern keyboard features.
42609f5 to
4c463eb
Compare
|
Hi, I'm looking into an alternative implementation that may future-proof this and could serve as a test bed for File Explorer status bar announcement issue (don't remember exactly which ticket it was). basically I'm thinking about locating a specific UIA element based on automation ID rather than traversing through the UIA tree. If it works (to be tested via Windows 10 App Essentials add-on), I'll open a successor PR to resolve this unless it is fine to continue working on this branch. Thanks. |
|
Hi, Actually, scratch the alternative - traversal is still required when reading clipboard announcement when clipboard history is empty. So traversal is the way to go for this one. Thanks. |
|
Hi, Technically, #11214 addresses name change event in emoji panel. This PR addresses UIA element traversal, which is different from that PR (note: the above comment was corrected). Thanks. |
|
Hi, Since #11447 was merged, this pull request has become a bit complicated, as modern keyboard support must be revised extensively thanks to detection of UIA events for elements with no Automation Id property. Therefore a future PR will succeed this one - closing for now (I plan to integrate this PR into the succeeding PR). Thanks. |
Link to issue number:
Fixes #10377
Summary of the issue:
In May 2019 Update, wrong item is announced when emoji panel and clipboard history opens due to UIA tree changes.
Description of how this pull request fixes the issue:
Depending on UIA automation ID, select the right child from emoji panel/clipboard history panel so the correct item can be announced when it opens.
Testing performed:
Tested via Windows 10 App Essentials add-on.
Known issues with pull request:
None
Change log entry:
None