Skip to content

ia2TextMozilla: report addresses in outlook.com and Modern Outlook's To/CC/BCC fields #16870

Merged
SaschaCowley merged 5 commits into
betafrom
i16631
Jul 17, 2024
Merged

ia2TextMozilla: report addresses in outlook.com and Modern Outlook's To/CC/BCC fields #16870
SaschaCowley merged 5 commits into
betafrom
i16631

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Jul 16, 2024

Copy link
Copy Markdown
Member

This is an improvement over PR #16856 to ensure that system tests continue to pass.
the difference being that the logic has been tightened to only expose name as content for buttons that are non-contenteditable within a contenteditable. Previously it was also matching on links, which seem to actually never get the editable state.

Link to issue number:

Fixes #16631
Replaces PR #16856

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:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Summary by CodeRabbit

  • New Features

    • NVDA now reports addresses when navigating through To/CC/BCC fields in Outlook.com and Modern Outlook.
  • Improvements

    • Enhanced handling of add-on installation failures, providing a more robust experience.

…thin a contenteditable. Required to report addresses in outlook.com / Modern Outlook To/CC/BCC fields.
…tons as links actually don't get the editable state.
@michaelDCurran michaelDCurran requested a review from a team as a code owner July 16, 2024 21:46
@michaelDCurran michaelDCurran requested review from SaschaCowley and removed request for a team July 16, 2024 21:46
@coderabbitai

coderabbitai Bot commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

Walkthrough

This update enhances NVDA's ability to report recipient names in Outlook.com/modern Outlook's To/CC/BCC fields by ensuring that labeled buttons are announced correctly. Additionally, it improves the handling of add-on installation failures in NVDA.

Changes

File Change Summary
source/NVDAObjects/IAccessible/... Implemented logic to handle labeled buttons in Outlook.com/modern Outlook's To/CC/BCC fields to ensure the names are reported.
user_docs/en/changes.md Documented new functionality for reporting addresses in To/CC/BCC fields and improved handling of add-on installation failures.

Assessment against linked issues

Objective Addressed Explanation
NVDA should announce focused recipient name while navigating between recipients added in To/CC/BCC Fields (#16631).

Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4ef1f68 and b8dce41.

Files selected for processing (2)
  • source/NVDAObjects/IAccessible/ia2TextMozilla.py (1 hunks)
  • user_docs/en/changes.md (1 hunks)
Additional context used
Path-based instructions (2)
source/NVDAObjects/IAccessible/ia2TextMozilla.py (2)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious.


Pattern **/*.py: _, pgettext, ngettext, and ngettext are defined globally, errors for this being undefined can be ignored.

user_docs/en/changes.md (2)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious.


Pattern **/*.md: Focus on grammar, spelling, and punctuation. Also consider readability and clarity of contents. Ensure that changes follow the style of one sentence per line, suggest changes if this is not met.

Additional comments not posted (1)
source/NVDAObjects/IAccessible/ia2TextMozilla.py (1)

83-93: Enhancement to address reporting of addresses in Outlook fields

The changes introduced in lines 83-93 aim to ensure that NVDA reports the names of email addresses in the To/CC/BCC fields of Outlook correctly by checking the role and states of the objects and their parents. This is a targeted fix for a specific issue reported in the linked GitHub issue.

  • Correctness: The logic correctly identifies non-contenteditable buttons within a contenteditable parent and sets their 'content' key to the object's name. This should effectively address the issue described.
  • Security: There are no apparent security concerns with this change as it relates to data handling within NVDA's scope.
  • Performance: The change is minimal and should not impact performance significantly.
  • Edge Cases: Consider verifying that all potential configurations of the Outlook fields are handled, including variations in how buttons might be presented or nested.

Overall, the change is well-targeted and appears to be correctly implemented to address the specific issue of NVDA not reporting email addresses in Outlook fields.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
user_docs/en/changes.md (2)

84-84: Ensure consistency and clarity in the documentation.

The entry for the change related to reporting addresses in To/CC/BCC fields could be expanded for clarity. It should explicitly mention that this is an improvement over previous functionality, as detailed in the PR description.

- * NVDA will report addresses when arrowing through To/CC/BCC fields in outlook.com / Modern Outlook. (#16856)
+ * Improved: NVDA now reports email addresses in addition to graphics when arrowing through To/CC/BCC fields in outlook.com and Modern Outlook, enhancing user accessibility. (#16856)

84-84: Grammar and style check for documentation.

The change log entries are well-written, but they should follow the one sentence per line style guideline. This helps in maintaining readability and makes future diffs cleaner and easier to understand.

- * NVDA will report addresses when arrowing through To/CC/BCC fields in outlook.com / Modern Outlook. (#16856)
- * NVDA now handles add-on installation failures more gracefully. (#16704)
+ * NVDA will report addresses when arrowing through To/CC/BCC fields in outlook.com / Modern Outlook. (#16856)
+ * NVDA now handles add-on installation failures more gracefully. (#16704)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants