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

Formatting in Word: style is not properly reported in some cases with UIA enabled #11427

Open
AAClause opened this issue Jul 27, 2020 · 10 comments
Labels
blocked/needs-external-fix component/UIA-ms-office Specific to UIA used in MS office applications. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. ux

Comments

@AAClause
Copy link
Contributor

AAClause commented Jul 27, 2020

Steps to reproduce:

Several ways to reproduce this, here's one:

  1. Open Microsoft Word, create a new document.
  2. Write an URL (e.g. https://google.com) then press enter.
  3. Move the cursor on the last character of the previous line (i.e. m).
  4. Press NVDA+f.

Actual behavior:

Something like "style <POINTER(IUnknown) ptr=0x5d9bbd24 at 52462b0>" is reported.

Expected behavior:

The correct style should be reported (in this case 'Normal').

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-20601,3a9484fb

Windows version:

10 Insider (64-bit) build 20175.1000

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

Microsoft Office Word 16.0.13001.20384

Other information about your system:

UIA enabled

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Not tested

If addons are disabled, is your problem still occuring?

Yes

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Yes

@Adriani90
Copy link
Collaborator

@Andre9642 this issue does not occur if UIA Support in Word is disabled. Is this correct?

@AAClause
Copy link
Contributor Author

@Adriani90 Yes, absolutely.

@AAClause AAClause changed the title Formatting in Word: style is not properly reported in some cases Formatting in Word: style is not properly reported in some cases with UIA enabled Jul 27, 2020
@ainekc
Copy link

ainekc commented Mar 24, 2021

Also NVDA doesn't read any line or para info for me when UIA is enabled. Works as expected without UIA.

@michaelDCurran
Copy link
Member

Technical:
When an IUIAutomationTextRange spans the last character of a link, GetAttributeValue given UIA_StyleNameAttributeId returns a ReservedMixedAttributeValue object rather than the name of the style E.g. 'Normal'. This is true even if the style of the link is identical to the style after the link.
This seems to be a bug in Microsoft Word. At most we could not include style if its value is MixedAttributeValue, or we can report "Unknown" or "Mixed". But that is as far as we can go in NVDA. @AAClause which do you think would be the best approach until this is addressed in MS word?

@AAClause
Copy link
Contributor Author

@michaelDCurran In this case, I would prefer not to include the style since it is unknown. "mixed" seems vague to me.

Out of curiosity I tested with JAWS (version 2021.2107.12, UIA in Word enabled), here are the results:

My original line (link):
https://google.com/

From position 1 to -1 ("ttps://google.com/"), we get:

Insertion point formatting
Single underline
11 point
DodgerBlue3 on Blanc
Calibri
Lien hypertexte style

Line spacing: 1 lines.

Paragraph formatting: Aligned left

Outline level: body text

At position 0 ('h'):

Insertion point formatting
11 point
DodgerBlue3 on Blanc
Calibri
Normal style

Line spacing: 1 lines.

Paragraph formatting: Aligned left

Outline level: body text

For the reference, with NVDA we get:

From position 0 to -2 ("https://google.com"):

style Normal
Calibri
11 pt
aqua-blue on white
underlined
baseline
align left
line spacing 1,08 multiple

At position -1 ('/'):

style <POINTER(IUnknown) ptr=0x6e0e7cdc at bab22b0>
Calibri
11 pt
white background
underlined
baseline
align left
line spacing 1,08 multiple

@CyrilleB79
Copy link
Collaborator

Note that also the foreground color is not available for this last character of the link. But on the contrary to style, the information is just omitted.

@Qchristensen Qchristensen added the component/UIA-ms-office Specific to UIA used in MS office applications. label Oct 25, 2021
@XLTechie
Copy link
Collaborator

@michaelDCurran versions of this can still be replicated in Word (365 and 2019, at least), as recently asked about on an NVDA users list.

I can replicate it with UIA on, entering/pasting a link, and navigating back up to the line with the link on it.
style <POINTER(IUnknown) ptr=0x6e7c6cb4 at 51e2710>

UIA off reports this as style hyperlink.

If the only options are what you describe above, then my vote is for style mixed.

Unknown is untrue, since in non-UIA mode it is knowable.

@LittleStar-VIP
Copy link

I have reported the problem to Microsoft accessibility help desk, and have also attached the link of this thread to the supporting staff.

@feerrenrut feerrenrut added blocked/needs-external-fix p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority ux triaged Has been triaged, issue is waiting for implementation. labels Sep 8, 2022
@feerrenrut
Copy link
Contributor

Happy for a PR to improve the UX of the failure, reporting "unknown" rather than the object string would be better. This would only be until the issue can be fixed in MS word.

@AAClause
Copy link
Contributor Author

@feerrenrut In that case, how about omitting the style information? For instance, when alignment info is not available nothing is reported

@seanbudd seanbudd added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority and removed p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/needs-external-fix component/UIA-ms-office Specific to UIA used in MS office applications. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. ux
Projects
None yet
Development

No branches or pull requests

10 participants