Closed Bug 1520779 Opened 5 years ago Closed 4 years ago

NVDA falls back to “line” text unit resolution as Firefox doesn’t properly support the “paragraph” resolution

Categories

(Core :: Disability Access APIs, defect, P2)

All
Windows
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr60 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox82 --- fixed

People

(Reporter: emilghitta, Assigned: MarcoZ)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome)

Attachments

(6 files)

Affected versions

  • Firefox 66.0a1 (BuildId:20190116170105)
  • Firefox 65.0b11 (BuildId:20190114172331)
  • Firefox 64.0.2 (BuildId:20190108160530)
  • Firefox 60.4.0esr (BuildId:20181203164059)

Affected platforms

  • Windows 10 64bit.
  • Windows 7 32bit.

Preconditions

  • Have NVDA screen reader enabled with the “Text unit resolution” set to “paragraph”.

Steps to reproduce

  1. Launch Firefox.
  2. Access the following webpage: https://www.lipsum.com/
  3. Hover over the first paragraph.

Expected result

  • NVDA successfully reads the entire paragraph.

Actual result

  • NVDA reads only the first line of the paragraph and the user has to hover over the next line in order to be read.

Regression range

  • I don’t think that this is a regression.

Additional notes

  • This is not reproducible on Google Chrome.
Priority: -- → P3

This is also super annoying for braille users who have "Read by paragraph" enabled in NVDA braille settings. Instead of reading by paragraph (which often means less pointless panning given that braille lines generally don't correspond with screen lines), you can only read by line.

Blocks: texta11y
Keywords: parity-chrome
Priority: P3 → P2

I was just pinged about this by Vispero. JAWS wants this too.

Assignee: nobody → mreschenberg
Assignee: mreschenberg → mzehe

Try run is here. Now waiting for Jamie to throw edge cases at me. ;-) And we need to decide whether we want to also have GetTextBefore and GetTextAfterOffset versions of this. NVDA doesn't call this ever, I've also reached out to Vispero to find out if they need it. Linux doesn't seem to use this granularity type at all, at least we have no reference in our code anywhere about any ATK granularities.

(In reply to Marco Zehe (:MarcoZ) from comment #9)

And we need to decide whether we want to also have GetTextBefore and GetTextAfterOffset versions of this.

Ug. I always found those methods so confusing, as well as the separate start and end boundaries.

Eitan, do we need to support GetTextBeforeOffset and GetTextAfterOffset for paragraph? And do we need separate paragraph start and paragraph end boundaries? I honestly don't understand why we need these at all for any boundary type, but I know you have a bit more experience with that and needed them for some things on Android and mac.

It seems to me that paragraphs should always be directly adjacent; i.e. there shouldn't be white space we would ever exclude, whereas there could be for lines and words.

Linux doesn't seem to use this granularity type at all, at least we have no reference in our code anywhere about any ATK granularities.

It looks like we just pass the boundary type from ATK to Gecko without any checking or normalisation, just assuming the constants match. And this isn't documented anywhere, even in a code comment. So that's fun.
https://searchfox.org/mozilla-central/rev/0c97a6410ff018c22e65a0cbe4e5f2ca4581b22e/accessible/atk/nsMaiInterfaceText.cpp#224

It looks like the AtkTextBoundary enum we use is deprecated. It doesn't have a paragraph boundary. It seems there is a newer ATKTextGranularity enum which does have a paragraph boundary and also gets rid of the separate START and END boundaries and just has LINE, WORD, etc. As a result, it uses a new atk_text_get_string_at_offset method. So, it's more like the way NVDA does things with IA2: no start or end boundaries, no before or after offset.

With a quick grep, it doesn't look like Orca uses this new granularity thing, though I could be missing something. I also couldn't find any reference to any paragraph boundary or granularity.

Long story short: I don't think we need to do anything here for ATK at this stage, but it might be something we need to look into in future.

Flags: needinfo?(eitan)

Tagging onto what we already do for getting line offsets, also doing the same when the paragraph selection is requested.

This could be useful in Android!

Whether we need the before/after methods. I'm not sure yet, but I think its fine if it isn't in the scope of this patch.

If we revisit and add android support for this, we will see.

Flags: needinfo?(eitan)
  1. Make sure the paragraph text and start and end ofsets returned for offsets on either the text or its adjacent br always match.
  2. For two consecutive line breaks, treat the second one as its own paragraph without text, and its start offset corresponding to its offset, and end offset being 1 greater.
  3. Add a test case exercising all cases.

Newest try build after a round of changes and hopefully all current edge cases fixed.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4cf65b0cd304
Part 1: Add the paragraph boundary to nsIAccessibleText, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/3ca759ecb3d7
Part 2: Implement nsIAccessibleText::BOUNDARY_PARAGRAPH in HyperTextAccessible::GetTextAtOffset, r=Jamie,eeejay
https://hg.mozilla.org/integration/autoland/rev/6ddb6ee83467
Part 3: Hook up the IA2_TEXT_BOUNDARY_PARAGRAPH to the internal nsIAccessibleText::BOUNDARY_PARAGRAPH support, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/2e3924874d25
Part 4: Add tests to exercise paragraph retrieval, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/3e53ec41f414
Part 5: Expose both text and list bullet when requesting the paragraph from a list item, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/1d5de85e5c45
Part 6: Return consistent results for paragraphs that contain forced line breaks, r=Jamie

That's bizarre. I don't see how HyperTextAccessible changes or tests could have caused those failures. I wonder if there were any other a11y patches landed around the same time that might have caused this?

Both try runs showed no indication of problems. This failure definitely seems unrelated to this patch series.

Flags: needinfo?(mzehe)
Pushed by mzehe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b04d7de4980
Part 1: Add the paragraph boundary to nsIAccessibleText, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/b4e833b459b2
Part 2: Implement nsIAccessibleText::BOUNDARY_PARAGRAPH in HyperTextAccessible::GetTextAtOffset, r=Jamie,eeejay
https://hg.mozilla.org/integration/autoland/rev/949cda3f4a12
Part 3: Hook up the IA2_TEXT_BOUNDARY_PARAGRAPH to the internal nsIAccessibleText::BOUNDARY_PARAGRAPH support, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/c972513d9991
Part 4: Add tests to exercise paragraph retrieval, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/d9dd1a2cf2cb
Part 5: Expose both text and list bullet when requesting the paragraph from a list item, r=Jamie
https://hg.mozilla.org/integration/autoland/rev/338bbaf179ae
Part 6: Return consistent results for paragraphs that contain forced line breaks, r=Jamie

This push apparently failed again. However, a try push that turned on everything Linux that could be turned on via try chooser, came back green. So whatever it is that' failing is a) a difference between try and autoland, and b) not related to this patch series. The two failing tests test image maps by moving the mouse over the image map area, waiting for an accessible Reorder event to fire, and then test the resulting tree. They time out, and usually if that happens, it means that the event we were waiting for never fired.

Regressions: 1665662
See Also: → 1666998
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: