Replies: 1 comment
-
Closing this as there appears to be no solution for this problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On some webpages NVDA divides content into paragraphs incorrectly. Two major examples of that are:
This also poses as a great problem for sentence navigation (Feature request: Include Sentence Nav as part of NVDA #8518) as reconstructing sentences spanning across multiple paragraphs is pretty complicated from algorithmic point of view.
So I would like to start a discussion to see if it's feasible to fix paragraph segmentation without causing too many side effects.
Currently SentenceNav add-on only tries to expand sentences across paragraphs if those paragraphs are compatible, where compatible is defined is:
textInfo.NVDAObjectAtStart.location[0]
is the same.For SentenceNav these two conditions are enough. There will be false positives in a properly paragraphed web page, but then SentenceNav will still detect that almost any paragraph still ends with a period, so it will still understand not to merge sentences incorrectly only because paragraphs are compatible.
However, if we consider the task of identifying paragraphs on broken pages (see two examples above) - these two conditions won't be enough. Primarily because the same kind of false positives that are benign in sentence division case would be considered a major regression for paragraph navigation.
Take a look at a sample blog post, that is properly paragraphed. If we only apply two heuristics above to merge paragraphs, then will end up with the entire article being a single gigantic paragraph. That would be a major regression.
So we need to come up with another heuristic to add to two sentenceNav heuristics mentioned above. I can see a couple of options:
Therefore I don't see a good heuristic that would work correctly in all cases for reconstructing paragraphs, that would work for both use cases I mentioned above and not cause any major regressions on other websites.
But I would like to check if I'm missing anything obvious and perhaps there is an easy way to reconstruct paragraphs? @CyrilleB79, do you have any suggestions/thoughts?
Beta Was this translation helpful? Give feedback.
All reactions