Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word 2016-365 installed with non-English language, with UIA is enabled, comments cannot be read #9285

Closed
zstanecic opened this issue Feb 15, 2019 · 13 comments · Fixed by #9631

Comments

@zstanecic
Copy link
Contributor

zstanecic commented Feb 15, 2019

Steps to reproduce:

Note, set office to use a language other than English.

approach 1:

  1. Open the word document provided in the attachment.
  2. When you arrow on a comment press insert+alt+c,

approach 2 - listing all comments in the elements list:

  1. press insert+f7, when in the browse mode,
  2. in the filter radio buttons category, find comments.

Actual behavior:

When the first approach is used, the shortcut is not working, i.e. the comment was not read.
When you use the second approach, the following can be found in the log:

ERROR - queueHandler.flushQueue (19:54:49.137):
Error in func initElementType from eventQueue
Traceback (most recent call last):
  File "queueHandler.pyc", line 53, in flushQueue
  File "browseMode.pyc", line 902, in initElementType
  File "browseMode.pyc", line 922, in filter
  File "NVDAObjects\UIA\wordDocument.pyc", line 88, in label
TypeError: format() argument after ** must be a mapping, not NoneType

The comments are not listed

See code:

		if not obj.parent or obj.parent.name!='Comment':
			continue

The problem is that this object name is language sensitive i.e. in polish it is "Komentarz". So when the language in word interface is set to other than english, this condition is always true and NVDA doesn't see any comments even if there are some.

Expected behavior:

The chomments should be listed and read, when nvda+alt+c, and when ins+f7 is pressed

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

alpha-16768,a6f7fb40

Windows version:

windows 10, 1809, 17763

Name and version of other software in use when reproducing the issue:

microsoft office 365, 16.0.11231.20122

Other information about your system:

the sample files in the comments to follow
Ęîëëîęâčóě_Ńňŕíĺ÷č÷.docx

Other questions

Does the issue still occur after restarting your PC?

yes

Have you tried any other versions of NVDA?

no

@zstanecic

This comment has been minimized.

@jakubl7545
Copy link
Contributor

This bug also occurs in NVDA 2019.1rc1

@feerrenrut
Copy link
Contributor

Related issues #9193 #9194 #9195

Please notice that Office (certainly excel) has changed the comments system. Renaming the old comments system as "notes", introducing a new comments system that supports replies.

@jakubl7545
Copy link
Contributor

jakubl7545 commented Apr 16, 2019

I've looked into it and it turned out that this issue is caused by that condition:

		if not obj.parent or obj.parent.name!='Comment':
			continue

The problem is that this object name is language sensitive i.e. in polish it is "Komentarz". So when the language in word interface is set to other than english, this condition is always true and NVDA doesn't see any comments even if there are some.

@Adriani90
Copy link
Collaborator

Does that mean you can read the comments if MS Word is set to english language?

@jakubl7545
Copy link
Contributor

I didn't checked that, but I changed the word 'Comment' from condition to polish "Komentarz" and it worked well, so I suppose it would work with MS Word language set to english.

@zstanecic
Copy link
Contributor Author

which is unacceptable, as i use word in russian, eventually polish when i am using it on another machine.
can we implement all possible names for it, to avoid switching languages to english, as it is not an option?

@Adriani90
Copy link
Collaborator

Adriani90 commented Apr 16, 2019 via email

@feerrenrut
Copy link
Contributor

The problem is that this object name is language sensitive i.e. in polish it is "Komentarz". So when the language in word interface is set to other than english, this condition is always true and NVDA doesn't see any comments even if there are some.

Thanks for looking into this. Yes, we will have to look for another way to filter this. @michaelDCurran do you have any ideas.

I'm going to modify the description and title of this issue to make it clear that language of office is important.

@feerrenrut feerrenrut changed the title In microsoft office Word 2016-365, when the UIA is enabled, the comments cannot be read Word 2016-365 installed with non-English language, with UIA is enabled, comments cannot be read Apr 26, 2019
@jakubl7545
Copy link
Contributor

I think I found another way to filter this. Instead of obj.parent.name it can check for obj.parent.role which is grouping and presence of AnnotationPattern. I would send a PR with that change,, but another issue stopps me.
When there is more than 13 comments the date doesn't fit on the screen, therefore one object is missing and NVDA produces an error
One way to fix this is to use legacy code for more than 13 comments, but I have no idea how to implement it properly
Another way is not to report date in this situation as date isn't the most important attribute here. If main developers agree on that solution I can send a PR.
I attached the test file which shows the problem.

test.docx

@jakubl7545
Copy link
Contributor

@feerrenrut Do you have any thoughts regarding my latest comment?

@feerrenrut
Copy link
Contributor

When there is more than 13 comments the date doesn't fit on the screen

If the number is 13 only because of the screen / windows size, then we can't hard code it. Instead, can we report date when we can, and catch errors when we can not?

@jakubl7545
Copy link
Contributor

That's what I did. When it is not possible to retrieve date only comment itself and author are reported.

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

Successfully merging a pull request may close this issue.

5 participants