Closed Bug 1832686 Opened 1 year ago Closed 11 months ago

Completely clipped accs should not be forced into the tree

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

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

People

(Reporter: morgan, Assigned: morgan)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This is a reduced test case from linkedin

data:text/html,<div id="container"><span id="visible" aria-hidden="true">hello world</span><span id="invisible" style="display:block;overflow:hidden; clip: rect(0 0 0 0);height: 1px; width:1px;position:absolute;">hello world</span></div>

STR:

  1. Hittest the container

Expected:
we get the invisible span's child text

Actual:
we get null

For the record, I thought maybe we could get around this by querying ink overflow or scrollable overflow for bounds instead of the frame rect, but it looks like clipping isn't reflected in either of those rects. Here's a dump of the frame tree for the above test case:

[66449 data:text/html,<div id="container"><span id="visible" aria-hidden="true">hello world</span><span id="invisible" style="display:block;overflow:hidden; clip: rect(0 0 0 0);height: 1px; width:1px;">hello world</span></div>]
Frame tree in app units:
docshell=0x107226da0 
Viewport(-1)@107426020 [view=110bd2e80] (x=0, y=0, w=61440, h=43200) [cs=1118a4138:-moz-viewport] <
  HTMLScroll(html)(-1)@107426198 parent=107426020 (x=0, y=0, w=61440, h=43200) [content=112108070] [cs=1118a4408:-moz-viewport-scroll] <
    ScrollbarFrame(scrollbar)(-1)@107426430 parent=107426198 next=107426678 (x=0, y=0, w=0, h=0) [content=112108220] [cs=1118a56c8] <
      SliderFrame(slider)(-1)@107426520 parent=107426430 (x=0, y=0, w=0, h=0) [content=1121083d0] [cs=1118a57b8] <
        Frame(thumb)(0)@107426600 parent=107426520 (x=0, y=0, w=1560, h=0) [content=11210c0c0] [cs=1118a58a8]
      >
    >
    ScrollbarFrame(scrollbar)(-1)@107426678 parent=107426198 next=1074268c0 (x=0, y=0, w=0, h=0) [content=1121082b0] [cs=1118a5998] <
      SliderFrame(slider)(-1)@107426768 parent=107426678 (x=0, y=0, w=0, h=0) [content=112108460] [cs=1118a5a88] <
        Frame(thumb)(0)@107426848 parent=107426768 (x=0, y=0, w=0, h=1560) [content=11210c170] [cs=1118a5b78]
      >
    >
    Frame(scrollcorner)(-1)@1074268c0 parent=107426198 next=1074260c8 (x=61440, y=43200, w=0, h=0) [content=112108340] [cs=1118a46d8]
    Canvas(html)(-1)@1074260c8 parent=107426198 (x=0, y=0, w=61440, h=43200) [content=112108070] [cs=1118a4b88:-moz-scrolled-canvas] <
      Block(html)(-1)@107426938 parent=1074260c8 (x=0, y=0, w=61440, h=2172) [content=112108070] [cs=1050a6b68] <
        line@107426ac8 count=1 state=block,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:nonebm=480 (x=480, y=480, w=60480, h=1212) ink-overflow=(x=450, y=480, w=60510, h=1212) scr-overflow=(x=480, y=480, w=60480, h=1212) <
          Block(body)(1)@107426a00 parent=107426938 (x=480, y=480, w=60480, h=1212) ink-overflow=(x=-30, y=0, w=60510, h=1212) scr-overflow=(x=0, y=0, w=60480, h=1212) [content=112108190] [cs=1118a4318] <
            line@107427218 count=1 state=block,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=60480, h=1212) ink-overflow=(x=-30, y=0, w=60510, h=1212) scr-overflow=(x=0, y=0, w=60480, h=1212) <
              Block(div id=container)(0)@107426b18 parent=107426a00 (x=0, y=0, w=60480, h=1212) ink-overflow=(x=-30, y=0, w=60510, h=1212) [content=112108580] [cs=1118a5038] <
                line@107427178 count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=4400, h=1152) ink-overflow=(x=-30, y=0, w=4460, h=1152) scr-overflow=(x=0, y=0, w=4400, h=1152) <
                  Inline(span id=visible)(0)@107426be0 parent=107426b18 next=107426d28 (x=0, y=96, w=4400, h=960) ink-overflow=(x=-30, y=0, w=4460, h=960) scr-overflow=(x=0, y=0, w=4400, h=960) [content=112108610] [cs=1118a5128] <
                    Text(0)"hello world"@107426c88 parent=107426be0 (x=0, y=0, w=4400, h=960) ink-overflow=(x=-30, y=0, w=4460, h=960) [content=112110080] [cs=1118a5308:-moz-text] [run=1118b42d0][0,11,T] 
                  >
                >
                line@1074271c8 count=1 state=block,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=1152, w=60, h=60) <
                  HTMLScroll(span id=invisible)(1)@107426d28 parent=107426b18 (x=0, y=1152, w=60, h=60) [content=1121086a0] [cs=1118a5218] <
                    Block(span id=invisible)(1)@107426fc0 parent=107426d28 (x=0, y=0, w=60, h=60) ink-overflow=(x=0, y=0, w=2240, h=2304) scr-overflow=(x=0, y=0, w=2240, h=2304) [content=1121086a0] [cs=1118a53f8:-moz-scrolled-content] <
                      line@107427128 count=1 state=inline,clean,prevmarginclean,not-impacted,wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=1920, h=1152) ink-overflow=(x=-30, y=0, w=2220, h=1152) scr-overflow=(x=0, y=0, w=1920, h=1152) <
                        Text(0)"hello "@107427088 parent=107426fc0 next=107427268 next-in-flow=107427268 (x=0, y=96, w=1920, h=960) ink-overflow=(x=-30, y=0, w=2220, h=960) scr-overflow=(x=0, y=0, w=1920, h=960) [content=112110100] [cs=1118a54e8:-moz-text] [run=1118b4380][0,6,F] 
                      >
                      line@107427318 count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=1152, w=2240, h=1152) ink-overflow=(x=-30, y=1152, w=2300, h=1152) scr-overflow=(x=0, y=1152, w=2240, h=1152) <
                        Text(0)"world"@107427268 parent=107426fc0 prev-in-flow=107427088 (x=0, y=1248, w=2240, h=960) ink-overflow=(x=-30, y=0, w=2300, h=960) scr-overflow=(x=0, y=0, w=2240, h=960) [content=112110100] [cs=1118a54e8:-moz-text] [run=1118b4380][6,5,T]

Oops I forgot to include position:absolute; -- now we can use the ink overflow. Updated tree dump:

          Block(body)(1)@105626a00 parent=105626938 (x=480, y=480, w=60480, h=1152) ink-overflow=(x=-30, y=0, w=60510, h=1152) scr-overflow=(x=0, y=0, w=60480, h=1152) [content=110408190] [cs=10f990228] <
            line@105627248 count=1 state=block,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=60480, h=1152) ink-overflow=(x=-30, y=0, w=60510, h=1152) scr-overflow=(x=0, y=0, w=60480, h=1152) <
              Block(div id=container)(0)@105626b18 parent=105626a00 (x=0, y=0, w=60480, h=1152) ink-overflow=(x=-30, y=0, w=60510, h=1152) [content=110408580] [cs=10f990d68] <
                line@1056271f8 count=2 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=4400, h=1152) ink-overflow=(x=-30, y=0, w=4460, h=1152) scr-overflow=(x=0, y=0, w=4400, h=1152) <
                  Inline(span id=visible)(0)@105626be0 parent=105626b18 next=105627088 (x=0, y=96, w=4400, h=960) ink-overflow=(x=-30, y=0, w=4460, h=960) scr-overflow=(x=0, y=0, w=4400, h=960) [content=110408610] [cs=10f990e58] <
                    Text(0)"hello world"@105626c88 parent=105626be0 (x=0, y=0, w=4400, h=960) ink-overflow=(x=-30, y=0, w=4460, h=960) [content=110410080] [cs=10f991038:-moz-text] [run=10f99c0c0][0,11,T] 
                  >
                  Placeholder(span id=invisible)(1)@105627088 parent=105626b18 (x=4400, y=816, w=0, h=0) [content=1104086a0] [cs=10f991218:-moz-oof-placeholder] outOfFlowFrame=HTMLScroll(span id=invisible)(1)@105626d28
                >
              >
            >
          >
        >
      >
      AbsoluteList@10edf7e00 <
        HTMLScroll(span id=invisible)(1)@105626d28 parent=1056260c8 (x=480, y=1632, w=60, h=60) ink-overflow=(x=0, y=0, w=0, h=0) scr-overflow=(x=0, y=0, w=0, h=0) [content=1104086a0] [cs=10f990f48] <
          Block(span id=invisible)(1)@105626fc0 parent=105626d28 (x=0, y=0, w=60, h=60) ink-overflow=(x=0, y=0, w=2240, h=2304) scr-overflow=(x=0, y=0, w=2240, h=2304) [content=1104086a0] [cs=10f991128:-moz-scrolled-content] <
            line@1056271a8 count=1 state=inline,clean,prevmarginclean,not-impacted,wrapped,no-break,clear-before:none,clear-after:none(x=0, y=0, w=1920, h=1152) ink-overflow=(x=-30, y=0, w=2220, h=1152) scr-overflow=(x=0, y=0, w=1920, h=1152) <
              Text(0)"hello "@105627108 parent=105626fc0 next=105627298 next-in-flow=105627298 (x=0, y=96, w=1920, h=960) ink-overflow=(x=-30, y=0, w=2220, h=960) scr-overflow=(x=0, y=0, w=1920, h=960) [content=110410100] [cs=10f991308:-moz-text] [run=10f99c170][0,6,F] 
            >
            line@105627348 count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,no-break,clear-before:none,clear-after:none(x=0, y=1152, w=2240, h=1152) ink-overflow=(x=-30, y=1152, w=2300, h=1152) scr-overflow=(x=0, y=1152, w=2240, h=1152) <
              Text(0)"world"@105627298 parent=105626fc0 prev-in-flow=105627108 (x=0, y=1248, w=2240, h=960) ink-overflow=(x=-30, y=0, w=2300, h=960) scr-overflow=(x=0, y=0, w=2240, h=960) [content=110410100] [cs=10f991308:-moz-text] [run=10f99c170][6,5,T] 

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

Severity: -- → S3
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/492778e5c97b
Fuzzy-match text leaves contained within generics when hittesting r=Jamie

Backed out for causing browser-a11y failures on browser_test_general.js.

[task 2023-05-24T03:33:23.214Z] 03:33:23     INFO - TEST-PASS | accessible/tests/browser/hittest/browser_test_general.js | Wrong direct child accessible at the point (168, 189) of [DOM node id: link, role: link, name: "I am some invisible text", address: [xpconnect wrapped nsIAccessible]], sought [DOM node id: generic, role: text container, address: [xpconnect wrapped nsIAccessible]] and got  "null"  - 
[task 2023-05-24T03:33:23.215Z] 03:33:23     INFO - Buffered messages finished
[task 2023-05-24T03:33:23.215Z] 03:33:23     INFO - TEST-UNEXPECTED-FAIL | accessible/tests/browser/hittest/browser_test_general.js | Timeout while waiting for cache update - 
[task 2023-05-24T03:33:23.215Z] 03:33:23     INFO - Stack trace:
[task 2023-05-24T03:33:23.216Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:test_ok:1582
[task 2023-05-24T03:33:23.217Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:timeout:845
[task 2023-05-24T03:33:23.217Z] 03:33:23     INFO - setTimeout handler*chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest_setTimeoutShim:920
[task 2023-05-24T03:33:23.217Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:untilCacheCondition/<:852
[task 2023-05-24T03:33:23.218Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:untilCacheCondition:827
[task 2023-05-24T03:33:23.218Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:untilCacheIs:868
[task 2023-05-24T03:33:23.218Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/hittest/head.js:testChildAtPoint:60
[task 2023-05-24T03:33:23.218Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/hittest/browser_test_general.js:null:299
[task 2023-05-24T03:33:23.218Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:accessibleTask/</<:548
[task 2023-05-24T03:33:23.219Z] 03:33:23     INFO - resource://testing-common/BrowserTestUtils.sys.mjs:withNewTab:149
[task 2023-05-24T03:33:23.219Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:accessibleTask/<:467
[task 2023-05-24T03:33:23.219Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:handleTask:1133
[task 2023-05-24T03:33:23.219Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1205
[task 2023-05-24T03:33:23.219Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1347
[task 2023-05-24T03:33:23.220Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1122
[task 2023-05-24T03:33:23.220Z] 03:33:23     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1056
[task 2023-05-24T03:33:23.221Z] 03:33:23     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-05-24T03:33:23.221Z] 03:33:23     INFO - TEST-UNEXPECTED-FAIL | accessible/tests/browser/hittest/browser_test_general.js | Wrong deepest child accessible at the point (168, 189) of [DOM node id: link, role: link, name: "I am some invisible text", address: [xpconnect wrapped nsIAccessible]], sought [role: text leaf, name: "I am some invisible text", address: [xpconnect wrapped nsIAccessible]] and got  "null"  - Got [xpconnect wrapped nsIAccessible], expected [xpconnect wrapped nsIAccessible]
[task 2023-05-24T03:33:23.222Z] 03:33:23     INFO - Stack trace:
[task 2023-05-24T03:33:23.222Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:test_is:1610
[task 2023-05-24T03:33:23.222Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:untilCacheIs/<:871
[task 2023-05-24T03:33:23.222Z] 03:33:23     INFO - promise callback*chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:untilCacheIs:871
[task 2023-05-24T03:33:23.223Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/hittest/head.js:testChildAtPoint:60
[task 2023-05-24T03:33:23.223Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/hittest/browser_test_general.js:null:299
[task 2023-05-24T03:33:23.224Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:accessibleTask/</<:548
[task 2023-05-24T03:33:23.224Z] 03:33:23     INFO - resource://testing-common/BrowserTestUtils.sys.mjs:withNewTab:149
[task 2023-05-24T03:33:23.224Z] 03:33:23     INFO - chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js:accessibleTask/<:467
[task 2023-05-24T03:33:23.225Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:handleTask:1133
[task 2023-05-24T03:33:23.225Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1205
[task 2023-05-24T03:33:23.225Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1347
[task 2023-05-24T03:33:23.226Z] 03:33:23     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1122
[task 2023-05-24T03:33:23.226Z] 03:33:23     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1056
[task 2023-05-24T03:33:23.227Z] 03:33:23     INFO - Leaving test bound 
[task 2023-05-24T03:33:23.227Z] 03:33:23     INFO - Entering test bound 
[task 2023-05-24T03:33:23.228Z] 03:33:23     INFO - GECKO(1590) | must wait for focus in content
[task 2023-05-24T03:33:23.284Z] 03:33:23     INFO - TEST-PASS | accessible/tests/browser/hittest/browser_test_general.js | Not remote browser - 
Flags: needinfo?(mreschenberg)
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22203924d7b7
Fuzzy-match text leaves contained within generics when hittesting r=Jamie
Flags: needinfo?(mreschenberg)
Flags: needinfo?(mreschenberg)
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1daa5ce8feb
Fuzzy-match text leaves contained within generics when hittesting r=Jamie
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
See Also: → 1837030

Backed out changeset c1daa5ce8feb (Bug 1832686) out of 115.0rc1 because the regressor (Bug 1825611) was backed out and for causing permafailures in browser_test_general.js, a=backout

the fix remains in fx116

https://hg.mozilla.org/releases/mozilla-beta/rev/fa15ea81806e25491783ce0553573fb780959801
https://treeherder.mozilla.org/jobs?repo=mozilla-beta&revision=fa15ea81806e25491783ce0553573fb780959801

QA Whiteboard: [qa-116b-p2]

Comment on attachment 9335089 [details]
Bug 1832686: Fuzzy-match text leaves contained within generics when hittesting r?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. 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 #9335089 - Flags: approval-mozilla-esr115?
Blocks: 1837024

Comment on attachment 9335089 [details]
Bug 1832686: Fuzzy-match text leaves contained within generics when hittesting r?Jamie

Approved for 115.4esr.

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