nvda
3ad497ae - Don't use IA2TextTextInfo on the web for object review and read line. (#20096)

Commit
29 days ago
Don't use IA2TextTextInfo on the web for object review and read line. (#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.
Author
Parents
Loading