Outlook 2016: report category and flagged status for messages.#8608
Conversation
|
@michaelDCurran commented on 8 aug. 2018 08:37 CEST:
Does this differ from how we are adding a flagIconLabel to the message announcement? There are some relevant comments from #7949:
I will fetch the appModule and use it on my system for a while. But it is at least very important to test this thoroughly in conversations view. |
LeonarddeR
left a comment
There was a problem hiding this comment.
Indeed, this does break in conversations view.
DEBUGWARNING - external:appModules.outlook.UIAGridRow._get_name (09:12:58.086):
Unable to get relevant children for UIAGridRow
…sation view threads where it fails to return any children at all. We can instead filter the tree for text and image elements which seems to get around the issue.
|
This is clearly a bug in the UIA client library then. I shall report
this to Microsoft.
However, I think I have worked around it, by changing the treeFilter to
allow both text and image elements.
|
|
@michaelDCurran commented on 8 aug. 2018 10:20 CEST:
Is it? Or is it an issue in Outlook where conversation view children aren't treated as content? They really should be treated a such IMO, at least in a similar way as in normal message view.
Hmm, that should work. However, note that this will also retrieve children that are considered non content, for example, the "no attachments" image. You're clearly filtering this later on though. It would be amazing if Microsoft can fix this, in which case we can also do attachment announcements using UIA. |
|
I also discovered that NVDA is now announcing "no flag" for messages without a flag. This seems a bit redundant to me. |
| or UIAClassName in ("CategoryField","FlagField") | ||
| ): | ||
| continue | ||
| name=e.cachedName |
There was a problem hiding this comment.
In an earlier version of #7949, I used this code snippet below this line:
isFlag = UIAClassName=="FlagField"
if isFlag:
flagIcon=0
if selection:
try:
flagIcon=selection.flagIcon
except COMError:
pass
if not flagIcon:
# This message has no flag.
# Filter the flag field, as it provides redundant information.
# Ignore flags if the object model couldn't be accessed.
continue
There was a problem hiding this comment.
THen, below the if text: line:
if isFlag:
# At least Outlook 2016 seems to have a bug where it is not possible to reorder the flag field in a view.
# Since flags are considered important, announce them as early as possible.
textList.insert(0, text)
else:
text+=u","
textList.append(text)
Feel free to discard from this code whatever you do not like. And at least do not forget to remove the flag fetching that happens earlier :)
|
It looks like marking a message as complete does not set
message.flagIcon but rather message.flagStatus. So I guess it would be
okay to check for either of those, as both complete and red flag etc
appear in the FlagField in UIA.
Similarly message.categories can be used to fetch the categories value.
If it is empty then we should ignore the CategoryField UIA element.
|
…ag and category fields.
LeonarddeR
left a comment
There was a problem hiding this comment.
From a code perspective, this looks ok now. I will test it during the next few days.
In the meanwhile, I'm getting increasing requests from people to add reading replied to/forwarded status to outlook messages. However, we rely on localised data for this info, and as noted earlier, the German order is different than the Dutch/English order, so we can't reliable filter redundant information. The information is present in the grid row's value in Outlook 15 (2013) and above. In Outlook 2010, the value might be identical to the name and thus is really redundant.
I see three possible implementations for this:
- Revert the value = None for outlook 2013 and above.
- Similar to 1, but map the value to the description object attribute. This allows people to toggle descriptions on and off in a per app profile, for example. This is my preferred approach.
- Add an object gesture to GridRow that reads the value.
Note that the value contains read/unread status, forwarded/replied as well as the message class (i.e. meeting request)
|
I reverted the replied/forwarded stuff. And have also removed the oleFlagLabels dictionary as it is no longer used. |
| # Stops us from reporting "no categories" which is too verbose. | ||
| elif UIAClassName=="CategoryField": | ||
| try: | ||
| if not selection.categories: continue |
There was a problem hiding this comment.
For me, this fails on the top level tree view items like "today" or "yesterday" when using conversations view.
AttributeError: 'NoneType' object has no attribute 'flagIcon'```
May be return early if not selection, or something like that?
…ion when matching on different fields for message rows.
|
This should be addressed now.
|
LeonarddeR
left a comment
There was a problem hiding this comment.
All right, this works as expected now :)
Link to issue number:
Fixes #8603
Summary of the issue:
When navigating the message list in Outlook 2016, NVDA does not report the message category or flag status (completed etc).
Description of how this pull request fixes the issue:
Ensure to collect the category and flag fields when traversing the UIA row's children.
Note that category and flagged are not text elements, but they do have welldefined UIA class names.
Thus the UIA cache request now grabs all children no matter their controlType, but the for loop only allows text elements and or those two class names.
Testing performed:
Testd with Outlook 2016. Focused a message with NVDA: NVDA announced the category and flagged status as the last two bits of information.
Known issues with pull request:
None.
Change log entry:
Bug fixes: