nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.08k stars 627 forks source link

Improved Support of Webpage Layouts #16336

Closed Jykke67 closed 5 months ago

Jykke67 commented 6 months ago

Is your feature request related to a problem? Please describe.

As a long-time JAWS user I’ve been used to get an exact view of documents like webpages containing e.g. headings of different levels, and they are often followed by a blank line that JAWS shows but NVDA doesn’t show.

Describe the solution you'd like

Blank lines around headings of different levels could be shown to make navigation more convenient when headings and other contents would be clearly separated from eachother during Say All or when navigating line by line.

Describe alternatives you've considered

A new Document formatting setting like “Do not ignore layout on webpages” could be added in future releases of NVDA.

Additional context

A screen reader should be able to give as exact view of screen and document layouts as possible, but user should have options to ignore descriptions that he/she considers as unnecessary. E.g. in JAWS this has been made possible by sound schemes that can be modified e.g. by replacing heading level x with h x where x is the number of a heading level. This would be equal to what is shown on the braille display, but user would have opportunity to choose even long descriptions or no descriptions. What I’m missing is something between "On" and "Off" without just imitating JAWS.

josephsl commented 6 months ago

Hi, two important questions: is blank lines around headings something sighted people can actually see, and how is Narrator behaving with respect to blank lines around headings?

josephsl commented 6 months ago

Hi,

Answer for Narrator: blank lines are NOT inserted around headings in scan mode. My first question still stands.

Side note: I think this issue could be a conversation starter on long-term impact of relying on virtual buffer representation of complex documents as the initial comment implies.

Thanks.

Jykke67 commented 6 months ago

Hi,

I made the same observation with Narrator on a webpage that contains both headings on different levels and — according to JAWS — blank lines after all or some of them, which made the navigation a bit easier.

Unfortunately I wasn’t able to test this with somebody sighted in order to observe the blank lines that JAWS was showing.

Your explanation concerning the buffer is logical. Thanks.

Jykke67 commented 6 months ago

Hi again,

I got an example of this even here: no blank lines that I’ve added in order to separate paragraphs were shown by NVDA. JAWS would probably have shown them.

When typing text blank lines are shown as they appear but not when reading.

XLTechie commented 6 months ago

@Jykke67 How did you add your blank lines? Add an example with code markers so we can see what you're doing. Also, a sample website where Jaws behaves "correctly", would be nice.

That said, paste the following into a browser address bar. If Jaws adds blank lines around the headings, it's a Jaws thing, and not actually present on the page:

data:text/html,<div><p>This is a text paragraph,<br />with two lines.</p><h1>This is a heading at level 1</h1><p>And here is an immediately following paragraph.</p></div><div><h2>Here is a heading separated by a div</h1></div><div><p>And here is the final paragraph</p></div>
Jykke67 commented 5 months ago

Hi ant thanks,

Yes, JAWS showed blank lines before and after the headings and between the paragraphs, and this is what I would even appreciate in NVDA.

With that said, any webpage containing headings and paragraphs do work as example, and your code did exactly the right thing in JAWS. It does so even on the main page of the Finnish Federation of Visually Impaired at https://www.nakovammaistenliitto.fi/en.

When navigating using NVDA, no blank lines are shown as separators, but when doing this using JAWS, they are shown exactly like in your code example. I could use nearly any webpage as an example. Thanks.

josephsl commented 5 months ago

Hi, at least this confirms my thinking that virtual buffer differences do play a role in seeing the world (web content) differently. Also, do try with Narrator and see what happens. Thanks.

Jykke67 commented 5 months ago

Yes. Have tried with Narrator yesterday, and no blank lines were shown.

Could do this, because any webpage containing headings and paragraphs are suitable for testing, but your code was excellent.

The result would be the same whatever web page I would try.

lukaszgo1 commented 5 months ago

Since we established above that these blank lines are not shown for sighted people, the only reason for adding an option I can see here is that their presence seems to be important for some users. @Jykke67 Would you be able to explain why having these blank lines before headings is useful - while 'I'm used to them from JAWS' is understandable answer I'd be reluctant to modify the web page presentation if it does not bring any objective benefit.

Jykke67 commented 5 months ago

Blank lines around headings and between paragraphs have the same purpose that they have e.g. in Word documents as separators. But if such lines are not visible for sighted users, they are shown just by JAWS and are probably not essential in NVDA.

If this is the case, it goes even for me. The more precise picture of the screen and page layouts, the better.

Knowing if these lines are shown for sighted users was the point here. If not, it’s OK.

josephsl commented 5 months ago

Hi, to muddy the water a bit, I imagine JAWS is showing blank lines around headings in different browsers. If yes, this could definitely a virtual buffer implementation differences (to confirm, try Luke’s example across Edge, Chrome, Firefox, and other browsers you have). Thanks.

Jykke67 commented 5 months ago

Yes, confirmed now with Firefox, Chrome and Edge that this is a JAWS thing.

burmancomp commented 5 months ago

I suppose that <p> should add some space although I am not sure how much it can be affected on html code (maybe quite a lot but is there interest to do that work).

Is it with Jaws so that it shows that there is a paragraph with blank line? If so then there is logic because there is paragraph and quite familiar way is to show it with blank line.

Is it with most pages so that sighted people cannot detect that there are paragraphs if there are paragraphs.

If they can detect paragraphs in many cases then nvda should be able to show them as well. Blank lines could be solution then.

burmancomp commented 5 months ago

I mean blank lines could be useful when moving with up/down arrow.

josephsl commented 5 months ago

CC @ britechguy, any comments?

Jykke67 commented 5 months ago

I mean blank lines could be useful when moving with up/down arrow.

Exactly, and yes, if sighted users are able to detect paragraphs on webpages, NVDA users should also be able to do this.

To repeat, I have found these blank lines shown by JAWS very useful both during Say All and when moving with up/down arrow. Therefore I have missed them when doing this with NVDA.

Adriani90 commented 5 months ago

@Jykke67 wrote:

To repeat, I have found these blank lines shown by JAWS very useful both during Say All and when moving with up/down arrow. Therefore I have missed them when doing this with NVDA.

Can you please elaborate in more detail why you find this useful? Does it give you more comfort to hear "blank"? Or what is the exact use case? Note that you can detect and navigate between text paragraphs in NVDA when you press p or shift+p in browse mode, or when you navigate with ctrl+arrow up and down. This works in MS Word and other text edit fields or documents as well.

Note that blank lines in MS Word are inserted manually by people, but this is not a standard. There is indeed the possibility to adjust the distance between lines in MS Word a higher distance between lines does not result in blank lines according to my tests, when using Jaws. Nor it does when using NVDA. You can get the distance information by pressing nvda+f

In browsers blank lines are not inserted manually, there might be cases where the browser renders automatically a distance between paragraphs, equivalent to what you can do in MS Word paragraph settings when adding distance between lines. However, given the fact that we have a command to detect text paragraphs, why do you need blank lines? These are only for visual representation and having all the distances displayed like the real screen layout would be totally inefficient. Moreover, there is no screen reader apart from Jaws inserting blank lines in their virtual documents. Voiceover does not do it as well.

Is it rather the use case that you need the voice to make a short pause between heading and text paragraph or between different text paragraphs? If this is the use case, then this is a duplicate of #4944.

Adriani90 commented 5 months ago

To be clear, translating in blank lines the visual layout where distance between lines is rendered by a browser automatically or where people adjust them via paragraph settings in MS Word would rather introduce misleading interpretations. The distance between lines is not always one line wide. Soometimes it is just 0.5 lines or even 1.5 lines. So translating these into one blank line does not represent the real layout in a better way.

Jykke67 commented 5 months ago

To be clear, translating in blank lines the visual layout where distance between lines is rendered by a browser automatically or where people adjust them via paragraph settings in MS Word would rather introduce misleading interpretations. The distance between lines is not always one line wide. Soometimes it is just 0.5 lines or even 1.5 lines. So translating these into one blank line does not represent the real layout in a better way.

Yes, you are right concerning variations of line spacing in Word.

Hearing "blank" on blank lines have been OK for me, but my questions concerning this have been answered by you and others.

And yes. navigating by paragraph is — and has been possible — in NVDA.

Thanks for mentioning that JAWS is the only screen reader that inserts blank lines after headings and between paragraphs on webpages. This makes me feel a bit more delighted. :)

Adriani90 commented 5 months ago

Given we don't have a clear use case for hearing the blank lines and #4944 is the most probable alternative target I am closing this issue.

@Jykke67 if you can explain more the benefits of having blank lines being spoken in the virtual document, we can reopen the discussion. Thanks.