Closed Bug 1828373 Opened 1 year ago Closed 1 year 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
firefox113 --- wontfix
firefox114 --- wontfix
firefox115 --- disabled
firefox116 --- fixed

People

(Reporter: Jamie, Assigned: morgan)

References

(Blocks 2 open bugs)

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
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: 1 year 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)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: