ia2TextMozilla: expose name as content for any non-contenteditable within a contenteditable. Required to report addresses in outlook.com / Modern Outlook To/CC/BCC fields.#16856
Conversation
…thin a contenteditable. Required to report addresses in outlook.com / Modern Outlook To/CC/BCC fields.
WalkthroughThe changes in Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
| from compoundDocuments import CompoundTextInfo | ||
| import locationHelper | ||
| from logHandler import log | ||
| import controlTypes |
There was a problem hiding this comment.
Remove redundant import statement.
The controlTypes import at line 27 is redundant as it is already imported at line 19.
- import controlTypesCommittable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import controlTypes |
Tools
Ruff
27-27: Redefinition of unused
controlTypesfrom line 19Remove definition:
controlTypes(F811)
See test results for failed build of commit 85226a68e9 |
Link to issue number:
Fixes #16631
Summary of the issue:
In outlook.com or Modern Outlook (Monarch) app, when arrowing through the To/CC/BCC fields, NVDA only reports button graphic for email addresses, and does not report the actual name/ address.
This is because NVDA knows it is in a contenteditable / editable text field, and assumes that all the content can be moved through by character, and therefore does not include meta info such as name on ancestor elements.
However, in this case, the addresses are actually on-contenteditable buttons within the contenteditable, which means that each button only takes up one character stop, and its content does not contain the name / address.
Description of user facing changes
NVDA now reports addresses when arrowing through To/CC/BCC fields in outlook.com / the Modern Outlook app.
Description of development approach
In ia2TextMozilla compound textInfo: conrolFields or objects that are non-contenteditable (don't have the editable state) are within a contenteditable (do have the editable state), have their 'content' key set to the object's name. Which forces NVDA to report the name as the content.
Testing strategy:
In outlook.com / Modern Outlook, created a new email message. Focused on the To field and inserted several email addresses. Then arrowed between them with the left and right arrow keys, ensuring that the addresses were reported.
Known issues with pull request:
Reporting of these addresses is still quite verbose. E.g. "button available Michael Curran mick@nvaccess.org graphic available"
And then arrowing onto another one:
"out of graphic out of button button available Gerald Hartig gerald@nvaccess.org"
Perhaps outlook.com / Modern Outlook could hide the inner graphic from the accessibility tree. And or, NVDA could somehow for non-contenteditable fields, generate a control field that does not require reporting out of at the end. E.g. like a checkbox or separator.
But at very least, this pr is a necessary improvement as before the addresses were not being reported at all.
Code Review Checklist:
Summary by CodeRabbit