Skip to content

Allow toggling reporting of graphics#9355

Merged
michaelDCurran merged 20 commits into
nvaccess:masterfrom
BabbageCom:i4837
Jun 23, 2020
Merged

Allow toggling reporting of graphics#9355
michaelDCurran merged 20 commits into
nvaccess:masterfrom
BabbageCom:i4837

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Mar 8, 2019

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #4837

Summary of the issue:

It has long been a desired feature to have the ability to disable reporting of graphics. Up until this pr, this was not possible. I've made several attempts in the past, but earlier attempts resulted in graphic alternative texts not being reported at all.

Description of how this pull request fixes the issue:

This adds the following:

  1. "Graphics" as an option to the document formatting panel
  2. An unbound globalCommand to toggle graphics reporting
  3. User guide entry
  4. In the case of IAccessible2, UIA and Word object model, the alternative text of a graphic now ends up in the content attribute on a control field. For Word (both object model and UIA), this was value before. Yay for consistency!
  5. For graphics, the content is always reported, regardless whether reporting of graphics is enabled.

Testing performed:

  • Tested in Chrome, FireFox, Internet Explorer, Edge, Word (with and without UIA), LibreOffice
  • Tested toggling of graphics reporting, either using the document formatting category or the global command

Known issues with pull request:

  1. The ability to disable reporting of graphics effectively only suppresses the reporting of the word "graphic", similar to headings, links, block quotes, etc. People might expect this option to disable reporting of graphics entirely, including alternative text. I think we should leave this as is for now. We could always expand this option in the future.
  2. For the word object model implementation, alternative text for charts and other objects is now exposed as part of the content property, no longer the value property. I'm pretty sure this won't cause any issues, but it might be good if @michaelDCurran can confirm this. I do not have a proper test case.
  3. I added a constant to NVDAHelper's winword code for graphics reporting. It is currently not used at all, since graphics are always fetched for their alternative texts. It made sense to add them for consistency reasons, though.

Change log entry:

Comment thread user_docs/en/userGuide.t2t Outdated
Comment thread source/globalCommands.py Outdated
Comment thread source/globalCommands.py Outdated
Comment thread nvdaHelper/remote/winword.cpp Outdated
Leonard de Ruijter and others added 3 commits May 9, 2019 18:42
@LeonarddeR LeonarddeR requested a review from feerrenrut May 13, 2019 17:35

@feerrenrut feerrenrut 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.

Generally I am happy with this. Though I would like @michaelDCurran to confirm he is ok with the known issues, particularly the second one.

Comment thread source/config/configSpec.py Outdated
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 5a54124e61

@michaelDCurran

Copy link
Copy Markdown
Member

I don't think point 2 under known issues is a problem as far as I can tell. However, I am quite concerned about point 1 and the possible mis-understanding by users. Is having this pr really worth that? Is this pr created as there is a great need by users to no longer hear the word "graphic" because it happens a lot... or is this created more for completeness as graphics was one of the only ones we didn't allow disabling?

@lukaszgo1

Copy link
Copy Markdown
Contributor

What other screen readers are doing in this case?

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Is this pr created as there is a great need by users to no longer hear the word "graphic" because it happens a lot... or is this created more for completeness as graphics was one of the only ones we didn't allow disabling?

My initial attempt for this pr was one of my first attempts to contribute to NVDA< so that's a long time ago.

#4837 was opened by @surfer0627, so may be he could elaborate. One of the use cases though is in applications where graphic is reported for every line erroneously. I've seen this in Adobe Reader as well. The behavior, namely that only the word graphic is ommitted is in line with the other controls that disable reporting of headings, links, etc.

@Adriani90

Copy link
Copy Markdown
Collaborator

I can provide you tomorrow with a pdf file for example, where there are hundreeds of pages and the thext is actually embeded in a graphic, so NVDA reads "graphic on every line. If you want to read that document, you will get really frustrated because on some lines NVDA reports "grpahic" like multiple times before reporting the actual text on the line.
I saw this behavior very often in pdf documents. I asume they are using IAccessible2 and the virtual buffer like in any browser, so this would apply here as well.

@CyrilleB79

Copy link
Copy Markdown
Contributor

Sorry to comment a bit lately on this PR...

Would it be more suitable to use a ternary option, e.g. with a combo-box as done for the Line indentation reporting option? The 3 options in this combo-box would be:

  • off
  • alternative description only
  • "Graphic" word and alternative description
    For this last option, I did not find a good text, please modify it.

Indeed, I have had the need of each option at one time or another.

  • Option 1 to read a newsletter with a lot of graphics that are only images, logos, etc. and where the ALT text is full of long garbage.
  • Option 2 to read some PDF's as described by @Adriani90.
  • Option 3 to read an unknown document before maybe switching to option 1 or 2.

@CyrilleB79

Copy link
Copy Markdown
Contributor

Note that if this ternary option is validated, this would be an issue for #10448, see my comment there. IMO a ternary option with a single 3-state toggle script is more convenient than two options (announce word "Graphic" dand announce ALT text) and two separated toggle scripts.

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are some conflicts which need to be fixed before I can merge this. Also, did all your tests involve both braille and speech?

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Conflicts fixed. Also reverted an accidental line removal in the user guide.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

did all your tests involve both braille and speech?

Good point. I realised I didn't test the case where the graphics content was set in content on the control field. Therefore the exception in speech made to that wasn't applied to braille. It now is, and I tested it in Word.

@michaelDCurran michaelDCurran merged commit 19284ce into nvaccess:master Jun 23, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.2 milestone Jun 23, 2020
michaelDCurran added a commit that referenced this pull request Jun 23, 2020
@michaelDCurran michaelDCurran modified the milestones: 2020.2, 2020.3 Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to disable reporting of graphics

8 participants