Repository: nvaccess/nvda

Issue:
Emphasised text is not reported according to its setting in IE

### Steps to reproduce:

In Internet Explorer, open this file: [ExEmphasisAndMarkedText.html.txt](https://github.com/nvaccess/nvda/files/5490739/ExEmphasisAndMarkedText.html.txt) after having removed its txt extension.

1. In Document formatting settings, disable Emphasis and Marked
  Then read the page.
2. In Document formatting settings, disable Emphasis and enable Marked
  Then read the page.
3. In Document formatting settings, enable Emphasis and disable Marked
  Then read the page.

### Actual behavior:

1. No formatting info read in the 3 first lines.
2. The words "Reef" and "Quentin" are read respectively as emphasized and marked.
3. No formatting info read in the 3 first lines.

### Expected behavior:

1. No formatting info read in the 3 first lines (same result).
2. Only "Quentin" is read as marked in the 3 first lines.
3. Only "Reef" is read as emphasized in the 3 first lines.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
2020.3
#### Windows version:
10
#### Name and version of other software in use when reproducing the issue:
Internet Explorer 11
#### Other information about your system:

### 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.
2020.2 has no issue regarding emphasis. This is a regression probably introduced by #11436. Note that reporting of marked content has been introduced only in 2020.3.


#### If addons are disabled, is your problem still occuring?
No tested.
#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
No

Reporting Of Marked (Highlighted) Text Should be Disabled By Default
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
-->

### Is your feature request related to a problem? Please describe.
I would not consider it to be a problem in the sense of that something is broken, however, I would consider it to be a change to address something that could be an annoyance to some.

Starting in NVDA 2020.3 beta 1, NVDA is able to report the marked state of text in web browsers, such as if text is emphasized or marked as strong, and this creates a lot of extra verbosity, especially on sites hosted by Microsoft, such as:
http://aka.ms/WindowsReleaseHealth (the Windows Release Health Dashboard in the "Issue Details" section), as well as their knowledge base articles for the optional non-security updates, such as the most recent one for Windows 10 version 1909:
https://support.microsoft.com/help/4577062
Under the heading "How To Get This Update", a ton of extra verbosity is present by default because NVDA says "Go to Strong settings not strong greater strong update and security not strong greater strong windows update not strong... and so forth.
Previously, this reporting was controlled by "Report Emphasis" being turned on. In NVDA 2015.4 when that feature was first introduced, it too was on by default, and in 2016.1 was disabled by default.


### Describe the solution you'd like

The solution I'd like to see is to still have this option available if people want to hear highlighted or marked text, but I don't think it should be on by default due to the extra verbosity it causes.

### Describe alternatives you've considered
I haven't thought about any alternatives since the option is either on or off (there's not really a middle ground).

### Additional context
I think it's nice to have this feature as stated previously, but much like the case with "Report Emphasis", I have a feeling that a lot of people won't like to hear all the extra verbosity generated by having this option on by default. I consider this option to be more of a proofing tool.

Thank you very much for your time and I look forward to any input you may have.

Sincerely,

Brandon Tyson


Discussion:

Hi.

I agree with the above. Personally, I think both options should be merged (emphasis and marked content), but for now, I think both should be disabled by default.
cc @feerrenrut 
and
@michaelDCurran 
I cannot reproduce. Did the pages change? 
Or is anybody else able to reproduce?
Hello,

Last time I checked the pages, NVDA continued to report”Strong” and “Not Strong” when reading the Microsoft KB updates.

Is this on a fresh install of 2020.3?

Thanks,

Brandon

> On Nov 4, 2020, at 9:33 AM, Cyrille Bougot <notifications@github.com> wrote:
> 
> 
> I cannot reproduce. Did the pages change?
> Or is anybody else able to reproduce?
> 
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/11640#issuecomment-721766597>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD6UHRXD3J772ZY4HQ6KGB3SOFQ27ANCNFSM4RTH2LWQ>.
> 


@michaelDCurran wrote in #11436 initial description (known issues):

> Marked text is now reported by default in web browsers, where as previously, at least in Internet Explorer, you needed to turn on report emphasis. I would argue that marking (highlighting) is extremely important semantically, and should be reported by default, as this is used in many education scenarios including online exams. However, having it under report emphasis along with em and strong would cause many users to want to keep the option off, as those two other tags are used way too much (and sometimes inappropriately) on web pages.

It seems so that the intent was not to report strong formatting when checking the marked checkbox. strong formatting was intended to be controlled by the 'Emphasis' checkbox.
But the implementation seems to have a bug. Actually, the 'Emphasis' checkbox now does not control anything more! I am preparing a PR to fix it.

So when this is fixed, I suggest to keep 'Emphasis' disabled and 'Marked' enabled by default in Document formatting settings, following @michaelDCurran's clear arguments.

@btman16, would you reconsider your request if strong formatting is finally controlled by 'Emphasis' checkbox (disabled by default)?




@btman16, one additional question: with which browser did you encounter this excessive verbosity? According to the code, it seems to me that only IE reported emphasis (emphasised or strong). Do you confirm this fact?
That would explain why I coud not reproduce this excessive verbosity, usually working on Firefox or Chrome.
Thanks.



Resolving patch:
diff --git a/source/speech/__init__.py b/source/speech/__init__.py
--- a/source/speech/__init__.py
+++ b/source/speech/__init__.py
@@ -2139,6 +2139,7 @@ def getFormatFieldSpeech(  # noqa: C901
 				# Translators: Reported when text is no longer marked
 				else _("not marked"))
 			textList.append(text)
+	if formatConfig["reportEmphasis"]:
 		# strong text
 		strong=attrs.get("strong")
 		oldStrong=attrsCache.get("strong") if attrsCache is not None else None


Test patch: