If the text of a control is not navigable, use NVDAObjectTextInfo for object review and read line.#18271
Conversation
|
Converting to draft until I figure out the Chrome system test failures. |
See test results for failed build of commit b619456c05 |
|
Unfortunately, I have to go back to square 0 on this. It breaks reporting of annotation details. I have some thoughts on another solution using |
|
It looks like something like this was done in the VS Code module to fix the same problem. Now that this would be completely fixed, maybe that custom code could be removed? Edit: Sorry, I just saw the comment above! |
c87d030 to
b1cd303
Compare
… object review and read line.
b1cd303 to
a9e5bfb
Compare
|
Does it fix #11285? If yes, or maybe in any case, it should rather land in the bugfix section of the change log, shouldn't it? |
|
I can't reproduce #11285 even with NVDA alpha. |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
I'm not willing to take on the reverts of the Visual Studio Code changes, as I don't use Visual Studio Code here and thus can't test whether this more generic fix actually addresses those issues correctly. However, someone else is very welcome to pursue that if/when this PR gets merged. |
|
Thanks @jcsteh |
|
Hi @jcsteh |
…ter fixed those issues.
Fixes #18399 Fixup regression caused by #18271 Summary of the issue: Since #18271, object navigation might cause errors with braille in XAML static text controls. Description of user facing changes: No errors, working braille. Description of developer facing changes: N/a Description of development approach: Be more conservative in applying an EditableText overlay class to UIA objects. Before this change, objects only needed to have UIATextInfo, implicitly meaning that it ought to have a text pattern. With this, we only add EditableText if either: a. The object has navigable text; or b. The objects text pattern reports that selection is supported.
…Info for object review and read line. (nvaccess#18271)" This reverts commit 7776fc0.
…Info for object review and read line. (nvaccess#18271)" This reverts commit 7776fc0.
…#20096) Fixes #15159. Summary of the issue: In focus mode in web browsers, when a control specifies a label using aria-label or aria-labelledby, it is impossible to review or spell that label; e.g. using read current line or the review cursor. This is particularly annoying and detrimental to efficiency when using web apps such as Gmail and Slack, among others, where you have to switch to browse mode to work around this even though it might be more efficient to use focus mode for navigation. Description of user facing changes: In focus mode in web browsers, it is now possible to review and spell the labels of controls when those labels are specifically provided for accessibility; e.g. via aria-label or aria-labelledby. Description of development approach: When in focus mode, for non-editable controls, both speech and braille report the name, description, value, etc. of the control; they don't use the TextInfo. However, previously, the review cursor and the read line command always used the TextInfo. Since IA2TextTextInfo is used for all objects supporting IAccessibleText, this meant that if the content wasn't a flat piece of text equal to the label, the review cursor and read line command would report something different, often nothing at all. To fix this, for IA2Web objects that aren't editors, use NVDAObjectTextInfo instead of the object's TextInfo for object review and the read line command. I first attempted to do this generically in #18271 using _hasNavigableText, but this caused problems elsewhere. Instead, the scope of this change is very specific, introducing a new _shouldUseTextInfoForReview NVDAObject attribute which is only set to False for Ia2Web objects.
Link to issue number:
Fixes #15159. Fixes #11285.
Summary of the issue:
In focus mode in web browsers, when a control specifies a label using aria-label or aria-labelledby, it is impossible to review or spell that label; e.g. using read current line or the review cursor. This is particularly annoying and detrimental to efficiency when using web apps such as Gmail and Slack, among others, where you have to switch to browse mode to work around this even though it might be more efficient to use focus mode for navigation.
The same bug also applies in Google Chrome menus and dialogs where UIA is not used, such as in Chrome 137.
Description of user facing changes:
In focus mode in web browsers, it is now possible to review and spell the labels of controls when those labels are specifically provided for accessibility; e.g. via aria-label or aria-labelledby.
Description of development approach:
When in focus mode, for non-editable controls, both speech and braille report the name, description, value, etc. of the control; they don't use the TextInfo. However, previously, the review cursor and the read line command always used the TextInfo. Since IA2TextTextInfo is used for all objects supporting IAccessibleText, this meant that if the content wasn't a flat piece of text equal to the label, the review cursor and read line command would report something different, often nothing at all. To fix this, use NVDAObjectTextInfo instead of the object's TextInfo for object review and the read line command.
Testing strategy:
In both Firefox and Edge:
data:text/html,<textarea>abVerified that in focus mode, formatting info is still reported for the review cursor, indicating that the correct TextInfo is being used. Also verified that the review cursor tracks the caret.
Known issues with pull request:
Although this fix is primarily about focus mode in web browsers, the code paths it touches are more generic than that. Anything that has a specific TextInfo but for which
_hasNavigableTextreturns False will be impacted. This is consistent with how we report the focus with speech and what is shown in braille, and thus I think this makes sense. Nevertheless, this potential broader impact is worth noting.Code Review Checklist:
@coderabbitai summary