Skip to content

Suppress reporting of tables when reading emails in Outlook using UIA#12820

Merged
michaelDCurran merged 4 commits into
masterfrom
i11430
Sep 9, 2021
Merged

Suppress reporting of tables when reading emails in Outlook using UIA#12820
michaelDCurran merged 4 commits into
masterfrom
i11430

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Sep 8, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #11430

Summary of the issue:

Microsoft Outlook uses a Microsoft word document control to present emails when both reading and composing. NVDA is in the process of switching to using UI Automation to access Microsoft Word document controls due to major performance advantages, and also due to Microsoft no longer maintaining the Office object model.
However, in the UI automation implementation exposed by MS Word document controls, it is impossible to identify the difference between a data table and a layout table. Thus, NVDa reports all layout tables when reading, which is extremely annoying, as the majority of HTML emails use many nested layout tables.

Description of how this pull request fixes the issue:

Tables are now classed as layout tables in MS Word document controls if the app is Outlook, and the table is read-only (Outlook is in message reading view).
Being marked as a layout table means that by default the table will not be reported, however the user can still turn on the Include Layout Tables option in NVDA's browse mode settings temporarily if there is a genuine data table they need to have reported.

Testing strategy:

With use UIA in MS Word controls enabled in NVDA's advanced settings:

  • Create a table in Microsoft Word and ensure that NVDA still reports it (number of rows / columns, cell's row and column number etc).
  • Create a table in Microsoft Outlook composition view and ensure that NVDA still reports it (number of rows / columns, cell's row and column number etc).
  • Open an HTML email in Outlook that has layout tables, and ensure that the table is not reported when moving into and through the table's content with the arrow keys.

Known issues with pull request:

All table reporting will be suppressed when reading emails in Outlook, even data tables. However, waying up the extreme annoyance of having layout tables read verses not reporting some very rare data tables (where the user can manually still enforce reporting by turning on includeLayoutTables) I think this is okay.
Though it would be much better if Outlook exposed layout tables in an identifiable way, such as not supporting the UI Automation Table Pattern for layout tables.

Change log entries:

Bug fixes:

  • When reading emails in Outlook and NVDA is accessing the message with UI Automation, reporting of tables is now suppressed by default.

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • API is compatible with existing addons.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

@michaelDCurran michaelDCurran requested a review from a team as a code owner September 8, 2021 21:52
@CyrilleB79

Copy link
Copy Markdown
Contributor

It seems that for Word documents (legacy), it is checked that the table has borders.
Is this something that could additionally be checked with UIA?
I guess layout tables do not have borders. Even if many data table don't either, this would already be a progress for the few data tables with borders.
I understand that the HTML messages with many layout tables (such as newsletters) is the most frequent. Even if less used, data table are quite common in professionnal or technical messages.

@michaelDCurran

michaelDCurran commented Sep 8, 2021 via email

Copy link
Copy Markdown
Member Author

Comment thread source/NVDAObjects/UIA/wordDocument.py Outdated
@michaelDCurran

michaelDCurran commented Sep 9, 2021 via email

Copy link
Copy Markdown
Member Author

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit eecfa50b7b

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.

Suppress layout tables when reading messages in Outlook with UIA for Word enabled

5 participants