Closed Bug 1837030 Opened 11 months ago Closed 11 months ago

NVDA does not read visible text leaf when fuzzy hit testing with generics

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr115 --- fixed
firefox116 --- fixed

People

(Reporter: nlapre, Assigned: morgan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The fix for Bug 1832686 does not seem to have worked on Windows with NVDA. This exists on LinkedIn.

STR:

  1. Open the following test case: data:text/html,<a href="example.com" id="link"><span style="overflow:hidden;" id="generic"><span aria-hidden="true" id="visible">I am some visible text</span><span id="invisible" style="overflow:hidden; height: 1px; width: 1px; position:absolute; clip: rect(0 0 0 0); display:block;">I am some invisible text</span></span></a>
  2. Attempt to hit test the visible text with the mouse.

Expected: NVDA will read the visible text, "I am some visible text".
Actual: NVDA says "text frame"

I think this is an NVDA problem since this test - added in Morgan's patch - passes in central. This test is the same test case in the STR above.

:nlapre, if you think that's a regression, could you try to find a regression range using for example mozregression?

Similar, maybe the same bug:

<head><style>.visually-hidden {display: block !important;border: 0 !important;clip: rect(0 0 0 0) !important;height: 1px !important;margin: -1px !important;overflow: hidden !important;padding: 0 !important;position: absolute !important;white-space: nowrap !important;width: 1px !important;}</style></head><span title="Michael is a Premium member"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="21" height="21"><g><path d="M19.5 0h-18A1.5 1.5 0 000 1.5v18A1.5 1.5 0 001.5 21h18a1.5 1.5 0 001.5-1.5v-18A1.5 1.5 0 0019.5 0zM6 18H3V8h3zM4.5 6.25a1.75 1.75 0 110-3.5 1.75 1.75 0 110 3.5zM18 18h-3v-5.09c0-1.62-.74-2.44-1.84-2.44A2.31 2.31 0 0011 13v5H8V8h3v1.39a4.06 4.06 0 013.3-1.63c1.77 0 3.66.93 3.66 4z"></path></g></svg></span><span class="visually-hidden">Michael has a premium account</span><a tabindex="0" href="https://www.linkedin.com/premium/products?upsellOrderOrigin=premium_badge_profile_upsell"><span class="visually-hidden">Click to upgrade to Premium</span></a></span>

Hit test the graphic and note that NVDA does not say "Michael has a premium account" as we'd expect.

This isn't a bug in NVDA. The test isn't wrong either. It's just not testing everything that NVDA does.

When VoiceOver (and some other screen readers) hit tests, they just find the deepest Accessible at the requested point (RemoteAccessibleBase::ChildAtPoint) and report its content. That works well enough, but doesn't allow you to report with finer text granularity; e.g. character, word, line or paragraph under the mouse. Instead, NVDA uses the text interface. Here's what it does (including the Gecko functions it maps to):

  1. Get the screen point under the mouse cursor. Let this be M.
  2. Hit test (RemoteAccessibleBase::ChildAtPoint) the root Accessible to get the deepest (eDeepestChild) Accessible at M. Let this target Accessible be T.
  3. If T is a text leaf, walk to its parent to get a HyperTextAccessible. Otherwise, just use T. Let this be H.
  4. On H, get the offset (HyperTextAccessibleBase::OffsetAtPoint) at M.

The hack in bug 1832686 deals with step 2. It doesn't deal with step 4. Since the point M is outside the bounds of HyperText H, we fail early in OffsetAtPoint. To fix this, we'd need to implement yet another hack there which detects this case and compensates for it.

Assignee: nobody → mreschenberg
Severity: -- → S3
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c552d41490c7
Treat fuzzily-matched text leaves as valid in OffsetAtPoint r=Jamie,nlapre
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1838782
Keywords: regression
Regressed by: 1825611

Comment on attachment 9338395 [details]
Bug 1837030: Treat fuzzily-matched text leaves as valid in OffsetAtPoint r?Jamie,nlapre

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Needed to fix various accessibility regressions introduced by the Cache the World project which shipped in 115.
  • User impact if declined: Screen reader mouse and touch tracking problems on popular sites such as LinkedIn. Regression introduced by bug 1825611.
  • Fix Landed on Version: 116
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Isolated to a specific case of accessibility hit testing. Covered by automated test. Baked on release since 116 without problems.
Attachment #9338395 - Flags: approval-mozilla-esr115?

Set release status flags based on info from the regressing bug 1825611

Comment on attachment 9338395 [details]
Bug 1837030: Treat fuzzily-matched text leaves as valid in OffsetAtPoint r?Jamie,nlapre

Approved for 115.4esr.

Attachment #9338395 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: