Closed Bug 1828373 Opened 2 years ago Closed 2 years ago

[CtW] Bounds incorrect when an element becomes scrollable later without reflow

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox-esr115 --- fixed
firefox113 --- wontfix
firefox114 --- wontfix
firefox115 --- disabled
firefox116 --- fixed

People

(Reporter: Jamie, Assigned: morgan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Spun off bug 1809082. Causes problems in LinkedIn and Google Bard.

From bug 1809082 comment 38:

data:text/html,<div style="height:100px; overflow:scroll;"><div id="text"></div></div><button onClick="let html=''; for (let i = 1; i <= 20; ++i) { html += i; html += '<br>'; } document.getElementById('text').innerHTML = html;">Add Text</button>

Click the "Add Text" button, then note the bounds of the "text" id. Scroll the scrollable region to the bottom. Note that the bounds of the text id have not changed accordingly. At this point, hit testing the scrolled text will report results as if it's unscrolled.

The contenteditable bit doesn't matter, but it does seem important that the text be entered after page load.

From bug 1809082 comment 39:

  1. What's happening here is that the overflow div isn't getting an Accessible, so we can't cache scroll data on it.
  2. Normally, when something is scrollable, it gets an Accessible because its scrollability makes it focusable and focusable things always get Accessibles.
  3. In this case, the div wasn't scrollable initially, so we didn't create an Accessible for it.
  4. Often, when something becomes scrollable, it causes reflow, in which case we would re-evaluate the div and create an Accessible for it.
  5. In this case, I guess it doesn't get reflowed, perhaps because the size of the div itself doesn't change. Thus, we don't create an Accessible for it.

We can fix this by always creating an Accessible for elements which have overflow: scroll or overflow: auto. To do that, we should be able to extend Morgan's creation patch over in bug 1825611.

Blocks: boundsa11y
See Also: → 1825411
Assignee: nobody → mreschenberg
Pushed by mreschenberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51f495933300 Create accs for elements with overflow:scroll and overflow:auto styling r=nlapre,Jamie

Backed out with Bug 1825611 and Bug 1825411 for accessible failures on on /browser_general.js

Pushed by mreschenberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1d00ca0cca3b Create accs for elements with overflow:scroll and overflow:auto styling r=nlapre,Jamie
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

The patch landed in nightly and beta is affected.
:morgan, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox114 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mreschenberg)

I think we will want to uplift this, but not yet -- it's a pretty big patch stack and it could use some more time to bake. I'll leave this NI and revisit

We've deemed this too risky to upload at this point in the cycle, marking 114 as wontfix

Flags: needinfo?(mreschenberg)
Regressions: 1840200

backed out in 115 beta (115.0rc1) for causing bug 1840200 (backout patch is in bug 1840200)

Comment on attachment 9329773 [details]
Bug 1828373: Create accs for elements with overflow:scroll and overflow:auto styling r?nlapre,Jamie

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.
  • Fix Landed on Version: 116
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): These patches did cause regressions. However, these have since been addressed and those fixes have been baking on release since at least 117.
Attachment #9329773 - Flags: approval-mozilla-esr115?

Comment on attachment 9329773 [details]
Bug 1828373: Create accs for elements with overflow:scroll and overflow:auto styling r?nlapre,Jamie

Approved for 115.4esr.

Attachment #9329773 - 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: