Fix empty edit fields not speaking in Microsoft Edge#12475
Conversation
|
I actually think that this pr will mean a significant improvement for Edge users, therefore I'd like to request to have this merged into beta instead. |
|
This is a significant improvement and hope to be merged into Beta |
|
Thanks a lot @LeonarddeR for fixing this. I have two questions :
Best regards. |
|
@alexarnaud wrote:
Yes.
If I knew where to do that, I'd certainly would. DO I need to do it against Edge or Chromium? Thoughts @michaelDCurran? |
…il when there is empty content.
…sses are added on top of the object
|
Hi, I recommend contacting Microsoft Edge team (hopefully through Feedback hub if possible) and also ask that Chromium/Chrome team look into this issue (because this could also impact other Chromium based browsers). Thanks.
|
|
I think it would be better if NV Access pokes their Microsoft contacts about this. |
|
Hi, and Google, too.
|
|
Well, as long as Google's implementation is experimental, I guess it's up to Microsoft to push fixes upstream. |
|
If one could trace it directly to the Chrome team, surely then it would be
on all and fixed with the same patch otherwise you might end up with a
different work around for every browser if one is not careful.
Brian
***@***.***
Sent via blueyonder.
Please address personal E-mail to:-
***@***.***, putting 'Brian Gaff'
in the display name field.
Newsgroup monitored: alt.comp.blind-users
----- Original Message -----
From: "Joseph Lee" ***@***.***>
To: "nvaccess/nvda" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Friday, May 28, 2021 2:30 PM
Subject: Re: [nvaccess/nvda] Fix empty edit fields not speaking in Microsoft
Edge (#12475)
… Hi, and Google, too.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#12475 (comment)
|
michaelDCurran
left a comment
There was a problem hiding this comment.
I am concirned that this may introduce performance issues, Especially also as these days it is important to try and keep the number of cross-process calls in UIA to a minimum with scenarios such as WDAG and RAIL.
In ChromiumUIATextInfo.expand: instead of the added calls to clone and compare, why not just call GetText(1) to fetch the first 1 characters and check if it is the empty string or not. If it is empty, then simply don't call expandToEnclosingUnit.
Although in general you are probably correct that we should call obj.invalidateCache after applying overlay classes, I would prefer this to be in its own pr, where we can very carefully consider and track any performance issues this may cause. This change obviously affects code across NVDA, not just the Edge address bar.
However, to address the specific issue of TextInfos incorrectly being cached here, perhaps we can at least set _cache_TextInfo = False on the UIA NVDAObject which will stop the TextInfo property from being cached. All the major calls it makes internally are cached properties themselves, so this would have no real performance impact, but it would still allow the current value of _TextInfo to be used, thus an overlay with a different TextInfo class would correctly be reflected in speakObject after overlay classes were applied but still in the same core cycle.
…rlay classes are added on top of the object" and set cache attribute on UIA This reverts commit 800abad.
Is that going to work? I assume GetText returns text in the range and doesn't return anything when the range is collapsed, therefore if the range is collapsed, it will never expand. |
|
Ah, sorry, I mean self.obj.UIATextPattern.documentRange.GetText(1)
|
|
Ah, yeah that makes sence. I changed this as requested. |
Link to issue number:
Fixes #12474
Fixes #12189
Summary of the issue:
Empty edit fields aren't spoken in Edge. There's a bug in the UIA implementation that causes expand to line to fail when there is no text content in the object
Description of how this pull request fixes the issue:
Testing strategy:
Tested that the address bar of Edge is read correctly when empty and focused.
Known issues with pull request:
None known.
Change log entries:
Bug fixes
Code Review Checklist: