Perma /webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py | test_locate_with_svg_context_node[accessibility-value3-expected3] - AssertionError
Categories
(Remote Protocol :: WebDriver BiDi, defect, P5)
Tracking
(firefox143 disabled, firefox144 fixed)
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m17], [wptsync upstream])
Attachments
(1 file)
The related test landed in bug 1980195 and was marked as expected perma fail. We should check why it's failing to return the expected node:
https://treeherder.mozilla.org/logviewer?job_id=520310469&repo=try&lineNumber=23165-23181
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - def recursive_compare(expected: Any, actual: Any) -> None:
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - if callable(expected):
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - expected(actual)
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - return
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO -
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - if isinstance(actual, List) and isinstance(expected, List):
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - > assert len(expected) == len(actual)
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - E AssertionError
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO -
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - actual = []
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - expected = [{'sharedId': <function any_string at 0x0000021EB10EC680>,
[task 2025-07-31T09:58:54.339+00:00] 09:58:54 INFO - 'type': 'node',
[task 2025-07-31T09:58:54.340+00:00] 09:58:54 INFO - 'value': {'childNodeCount': 1,
[task 2025-07-31T09:58:54.340+00:00] 09:58:54 INFO - 'localName': 'p',
[task 2025-07-31T09:58:54.340+00:00] 09:58:54 INFO - 'namespaceURI': 'http://www.w3.org/1999/xhtml',
[task 2025-07-31T09:58:54.340+00:00] 09:58:54 INFO - 'nodeType': 1}}]
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 1•6 months ago
|
||
The test as written is wrong. Have a look at the following page content:
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<circle aria-label="circle" cx="5" cy="5" r="5" />
<p role="banner" aria-label="bar">foo</p>
</svg>
Here we are putting a p element inside a svg which is not possible because it's not part of the SVG namespace. All browsers render the p element outside of the svg. As such no result should be returned when querying for accessibility role banner and name bar.
Note that all the browsers are failing this test including Chrome:
Alex, you wrote this test and I assume this slipped through. Maybe you wanted to use g instead? Changing this small thing makes the test work. I'll put up a patch to fix it.
| Assignee | ||
Comment 2•6 months ago
|
||
Updated•6 months ago
|
| Assignee | ||
Comment 3•6 months ago
|
||
Interesting is that the innerText locator tests are passing with Chrome and the unmodified test, which treats me to believe that there is a bug in Chrome. Such a call shouldn't return an element. Alex, maybe you can check?
| Assignee | ||
Updated•6 months ago
|
Comment 5•6 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•6 months ago
|
Comment 8•6 months ago
|
||
IIRC it passed when I tested. At least I could see a11y nodes in DevTools's a11y tree. In any case, the important part is that SVG node is accepted as the context node so please make any changes you found necessary!
Comment 9•6 months ago
|
||
I see it has landed! Thanks!
Description
•