Getting NVDA to announce inline Emphasis <em> tag when reading html text
Hi,
Yes and no:
- Yes because support for Internet Explorer has ended from Microsoft and will be removed/disabled in February 2023 at the earliest, with the replacement being Microsoft Edge with or without IE mode (IE mode is intended for business apps relying on MSHTML rendering engine technology).
- No because any application can embed MSHTML rendering engine, although Microsoft is asking folks to move to WebView2 (Edge-based). As long as the application in question uses MSHTML rendering engine to present web content and NVDA can recognize the resulting document as MSHTML-based, then the problem can be resolved (not entirely as then the question of ap accessibility can override other concerns).
How NVDA can do so requires a backstage tour of what is known as "text infos" - a collection of routines used to obtain text for the control and documents. This requires a bit of more work as text infos and browse mode are two of my weak points in my NVDA research and scholarship (I know that my strongest area outside of add-ons is UI Automation, closely followed by code documentation, experimenting with newer Python and dependency releases, touchscreens, and braille support). I'm calling my work "research and scholarship" to acknowledge the privilege and responsibility of being a researcher in training.
Cheers,
Joseph
So, in summary, you are saying that the only Web browser that currently supports the NVDA "emphasis" document formatting option is Microsoft Edge, and then only when it is running in Internet Explorer mode (which needs to be configured by the user). Is that correct?
All the best,
James
Hi,
Looks like it's time to inform NV Access about supporting emphasis tags in HTML rendering engines in addition to MSHTML... Emphasis works if using Microsoft Edge with Internet Explorer mode active. To see it in action, open the example page given earlier in this thread in Edge, and from the Edge menu (Alt+F), see if "Reload in Internet Explorer mode" is showing (it is showing on my system running Edge 109).
Technical: emphasis setting is checked when going through text via speech (doesn't matter if this is a review command or via say all). If "emphasis" is turned on from document formatting settings panel, NVDA will check format fields for the text being spoken, figuring out if "strong" and/or "emphasis" flags are set. Unfortunately, only MSHTML rendering engine support module returns these flags.
For resident developers going through NVDA source code: go through the following steps (based on Windows Subsystem for Linux):
- Locate report emphasis setting (found in source/config/configSpec.py).
- From WSL window, change to the root of the NVDA source code folder, then run: grep -lr "reportEmphasis" source
- Then run: grep -lr "strong" source
One of the last lines will point to virtualBuffers folder. Inside this folder is various virtual buffer implementations for various rendering engines such as MSHTML (Internet Explorer mode) and Gecko (Firefox). I suspect what needs to happen is to teach NVDA how to obtain emphasis markers from other rendering engines, made easier since Chromium family (Chrome and Edge included) and Firefox supports IAccessible2 (IA2 may or may not return format markers for cases like emphasis).
Cheers,
Joseph
Gene
On 1/17/2023 12:15 PM, james.crawford via groups.io wrote:
thanks Gene. here's an example: https://www.w3.org/WAI/WCAG21/Techniques/about where the word "Techniques" is enclosed in the <em> element in the paragraph under the Summary heading.
I assumed that if I checked the emphasis option above the mark option, then NVDA would announce the start and end <em> tags in a similar fashion. I was a little wary of the "read to end" option but it might be worth giving it a go.
James
I assumed that if I checked the emphasis option above the mark option, then NVDA would announce the start and end <em> tags in a similar fashion. I was a little wary of the "read to end" option but it might be worth giving it a go.
James
Though I haven't tested this, I suspect read to end may be designed not to announce this, but we'll see what others have to say. My recollection is that many things are intentionally not announced when reading in read to end. Though annoying, Perhaps either reading by paragraph or by line would allow you to hear it.
Gene
Hi, I am using NVDA v2022.3.2 (having trouble updating it to latest version) and can't find a way to get it to announce the emphasis tag (<em>) when in reading mode. I tried checking the "emphasis" Setting on the Document Formatting dialog, which I expected to work but it doesn't make a difference. Can anyone tell me how to get this to work? Thanks