Skip to content
Open
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
4a4bf54
[js] add the accessibility-snapshot atom scaffold
AutomatedTester Oct 23, 2026
bac5a29
[js] compute roles for the accessibility snapshot
AutomatedTester Oct 23, 2026
0b99154
[js] compute hidden-ness for the snapshot atom
AutomatedTester Oct 23, 2026
3b8f4dd
[js] walk the tree for the accessibility snapshot
AutomatedTester Oct 23, 2026
cc70c59
[js] compute names for the accessibility snapshot
AutomatedTester Oct 23, 2026
6c5e36b
[js] address review findings on the snapshot atom
AutomatedTester Oct 23, 2026
1f42b8c
[js] report states and values in the snapshot atom
AutomatedTester Oct 23, 2026
3014e9a
[js] walk the flat tree and honour aria-owns
AutomatedTester Oct 23, 2026
80d61c4
[js] add the accessibility snapshot corpus
AutomatedTester Oct 23, 2026
961f924
[js] harden the accessibility snapshot atom
AutomatedTester Oct 23, 2026
6764d82
[js] add a benchmark page for the snapshot atom
AutomatedTester Oct 23, 2026
dc0c5f7
[js] cache hidden state in the snapshot context
AutomatedTester Oct 23, 2026
0ad6bef
[js] skip generated-content reads where none exist
AutomatedTester Oct 23, 2026
101e7a6
[js] cache descendant text alternatives
AutomatedTester Oct 23, 2026
3a1daff
[js] cache reference text alternatives per target
AutomatedTester Oct 23, 2026
d387d80
[js] thread aria-disabled down the snapshot walk
AutomatedTester Oct 23, 2026
c913b25
[js] drop aria-owns relations that would loop
AutomatedTester Oct 23, 2026
ef2417f
[js] read only rendered text as generated content
AutomatedTester Oct 23, 2026
821252b
[js] stop one reference from silencing the next
AutomatedTester Oct 23, 2026
e8ca3a6
[js] report focus inside shadow roots
AutomatedTester Oct 23, 2026
c26a951
[js] name button inputs from their labels first
AutomatedTester Oct 23, 2026
8e2a46a
[js] scope banner and contentinfo by ancestor role
AutomatedTester Oct 23, 2026
f6f3a0a
[js] keep a snapshot value on one line of text
AutomatedTester Oct 23, 2026
43f132b
[build] check out the corpus expectations with LF
AutomatedTester Oct 23, 2026
94ce86a
[js] look up owner roles through the context
AutomatedTester Oct 23, 2026
6b56fb0
[build] give test bundles every test-only module
AutomatedTester Oct 23, 2026
5c9d2f0
[build] copy the corpus into the Node test's bin
AutomatedTester Oct 23, 2026
71b4eae
[js] find aria-owns owners through the flat tree
AutomatedTester Oct 23, 2026
f246c1f
[js] report states as WAI-ARIA scopes them
AutomatedTester Oct 23, 2026
f0e7630
[js] mask password values in the snapshot
AutomatedTester Oct 23, 2026
ed82645
[js] treat only HTML slot elements as slots
AutomatedTester Oct 23, 2026
cb253ea
[js] pin generated names on shadow hosts
AutomatedTester Oct 23, 2026
7911afb
[py] add accessibility_snapshot() to the binding
AutomatedTester Oct 24, 2026
0f96ac3
[js] add getAccessibilitySnapshot() to the binding
AutomatedTester Oct 24, 2026
88cea29
[py] fix accessibility snapshot frame roots
AutomatedTester Oct 24, 2026
e7b4901
[js] fix accessibility snapshot frame roots
AutomatedTester Oct 24, 2026
69d3879
[js] frames always report the iframe token
AutomatedTester Oct 24, 2026
90b0cfa
[js] run the snapshot suite on BiDi browsers only
AutomatedTester Oct 24, 2026
6699d23
[js] let eslint resolve the snapshot atom module
AutomatedTester Oct 24, 2026
0a54668
[js] leave the generated atom module out of eslint
AutomatedTester Oct 24, 2026
97c76b8
[rb] add accessibility_snapshot to the binding
AutomatedTester Oct 24, 2026
96c5253
[rb] load the BiDi error classes the snapshot uses
AutomatedTester Oct 24, 2026
a725343
[rb] keep the snapshot's error class in common
AutomatedTester Oct 24, 2026
1f902da
[js] fix form and disabled control roles
AutomatedTester Oct 24, 2026
1cbc868
[js] landmark names from a label's alternatives
AutomatedTester Oct 24, 2026
6b9be97
[py] guard and preload fixes from review
AutomatedTester Oct 24, 2026
59182a1
[js] set the preload flag only after it succeeds
AutomatedTester Oct 24, 2026
d7d79f1
[rb] set the preload flag only after it succeeds
AutomatedTester Oct 24, 2026
7944e7e
[js] share one preload across snapshots
AutomatedTester Oct 24, 2026
d7f96a1
[java] add getAccessibilitySnapshot() to the binding
AutomatedTester Oct 24, 2026
189d055
[js] read attr() in generated content, cache image maps
AutomatedTester Oct 24, 2026
e9e1a3d
[rb] build snapshot elements with the bridge's class
AutomatedTester Oct 24, 2026
9390590
[build] sort the core small tests' dependencies
AutomatedTester Oct 24, 2026
84859e7
[dotnet] add GetAccessibilitySnapshotAsync()
AutomatedTester Oct 24, 2026
adb839d
[build] let the core small tests read the web fixtures
AutomatedTester Oct 24, 2026
3cbbed5
[dotnet] close the snapshot connection safely
AutomatedTester Oct 24, 2026
9868337
[dotnet] drop an unused using from the unit test
AutomatedTester Oct 24, 2026
ab4dbc8
[js] add the wire shape of the accessibility atom
AutomatedTester Oct 24, 2026
7c8e434
[py] fetch the snapshot in the atom's wire shape
AutomatedTester Oct 24, 2026
ffb506a
[js] fetch the snapshot in the atom's wire shape
AutomatedTester Oct 24, 2026
7664cc3
[rb] fetch the snapshot in the atom's wire shape
AutomatedTester Oct 24, 2026
fa48ac2
[java] fetch the snapshot in the atom's wire shape
AutomatedTester Oct 24, 2026
dbb6be9
[dotnet] fetch the snapshot in the atom's wire shape
AutomatedTester Oct 24, 2026
44b04be
[dotnet] run the snapshot tests on the shared driver
AutomatedTester Oct 24, 2026
4ce3934
[dotnet] put the System using first in the snapshotter
AutomatedTester Oct 24, 2026
19da7a3
[dotnet] let the driver own the BiDi connection
AutomatedTester Oct 24, 2026
2c47192
[dotnet] close the BiDi connection once and keep its lock
AutomatedTester Oct 24, 2026
81c9b20
[dotnet] read the corpus with a client per request
AutomatedTester Oct 24, 2026
e306305
[js] answer null for a null root in the wire atom
AutomatedTester Oct 24, 2026
1fc7f71
[dotnet] open the BiDi connection as the session starts
AutomatedTester Oct 25, 2026
55c5148
[dotnet] answer an unowned root with null, not a throw
AutomatedTester Oct 25, 2026
67ccb84
[dotnet] name the snapshot helpers with verbs
AutomatedTester Oct 25, 2026
5caaf88
[dotnet] give the snapshotter no reference to the driver
AutomatedTester Oct 25, 2026
1b28d31
[dotnet] keep one snapshotter per driver
AutomatedTester Oct 25, 2026
3554a3c
[dotnet] leave the test app server as it was
AutomatedTester Oct 25, 2026
6ff78ca
[dotnet] mock the executor in the snapshot unit tests
AutomatedTester Oct 25, 2026
baad8a3
[dotnet] name the snapshot unit tests by what they check
AutomatedTester Oct 25, 2026
482a22a
[dotnet] say when a snapshot cannot be taken
AutomatedTester Oct 25, 2026
e8706de
[dotnet] await the corpus reads in the snapshot tests
AutomatedTester Oct 26, 2026
0c0dcdf
[dotnet] document the snapshot members with XML docs
AutomatedTester Oct 26, 2026
7e06a36
[dotnet] move the BiDi connection test to its fixture
AutomatedTester Oct 26, 2026
fb18d41
[dotnet] assert the connection test's exception type
AutomatedTester Oct 26, 2026
ca13798
[dotnet] use the newer member style in the new classes
AutomatedTester Oct 26, 2026
2feeea9
[dotnet] name the snapshotter field after its class
AutomatedTester Oct 26, 2026
8fa4696
[dotnet] fix the doc comment on CreateElementFromReference
AutomatedTester Oct 26, 2026
22f2cba
[dotnet] bridge the BiDi connection via Task.Run
AutomatedTester Oct 29, 2026
c781013
[dotnet] name the node constructor args in tests
AutomatedTester Oct 29, 2026
b3252f5
[dotnet] await the snapshot in the public methods
AutomatedTester Oct 29, 2026
a4d8719
[dotnet] return the snapshot task directly again
AutomatedTester Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# The CDDL parser keeps the carriage return in a production name, so a CRLF
# checkout of the overlays in common/bidi makes every type they define unresolvable.
*.cddl text eol=lf
# The corpus consistency test compares these byte for byte with the renderer's output.
common/src/web/accessibility/*.txt text eol=lf
common/src/web/accessibility/*.json text eol=lf
*.sql text
*.xml text

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ java/client/src/org/openqa/selenium/ie/IeReturnTypes.java
java/server/test/org/openqa/selenium/example
javascript/deps.js
javascript/selenium-webdriver/node_modules/
javascript/selenium-webdriver/lib/atoms/accessibility-snapshot.js
javascript/selenium-webdriver/lib/atoms/find-elements.js
javascript/selenium-webdriver/lib/atoms/get-attribute.js
javascript/selenium-webdriver/lib/atoms/is-displayed.js
Expand Down Expand Up @@ -85,6 +86,7 @@ py/selenium/webdriver/common/linux-x86_64/
py/selenium/webdriver/common/macos/
py/selenium/webdriver/common/mutation-listener.js
py/selenium/webdriver/common/windows/
py/selenium/webdriver/remote/accessibilitySnapshot.js
py/selenium/webdriver/remote/findElements.js
py/selenium/webdriver/remote/getAttribute.js
py/selenium/webdriver/remote/isDisplayed.js
Expand Down
11 changes: 11 additions & 0 deletions common/src/web/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ filegroup(
]),
visibility = [
"//dotnet/test:__subpackages__",
"//java/test/org/openqa/selenium:__pkg__",
"//java/test/org/openqa/selenium/environment:__pkg__",
"//javascript/atoms:__pkg__",
"//javascript/selenium-webdriver:__pkg__",
"//py:__pkg__",
"//rb/spec:__subpackages__",
Expand All @@ -24,3 +26,12 @@ js_library(
"//javascript/selenium-webdriver:__subpackages__",
],
)

# The accessibility snapshot corpus (ADR 18205), copied into the output tree
# so a js_test in another package can read it from its working directory:
# rules_js copies only its own package's source files there.
js_library(
name = "accessibility-corpus",
srcs = glob(["accessibility/**"]),
visibility = ["//javascript/atoms:__pkg__"],
)
202 changes: 202 additions & 0 deletions common/src/web/accessibility/001-headings-and-landmarks.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"role": "document",
"name": "Headings and landmarks",
"description": "",
"states": {},
"element": "root",
"children": [
{
"role": "banner",
"name": "",
"description": "",
"states": {},
"element": "header",
"children": [
{
"role": "heading",
"name": "Site title",
"description": "",
"states": {
"level": 1
},
"element": "h1",
"children": []
},
{
"role": "navigation",
"name": "",
"description": "",
"states": {},
"element": "nav",
"children": [
{
"role": "link",
"name": "Home",
"description": "",
"states": {},
"element": "home",
"children": []
},
{
"role": "link",
"name": "Docs",
"description": "",
"states": {},
"element": "docs",
"children": []
}
]
}
]
},
{
"role": "main",
"name": "",
"description": "",
"states": {},
"element": "main",
"children": [
{
"role": "heading",
"name": "Section",
"description": "",
"states": {
"level": 2
},
"element": "h2",
"children": []
},
{
"role": "region",
"name": "Updates",
"description": "",
"states": {},
"element": "region",
"children": [
{
"role": "heading",
"name": "Latest",
"description": "",
"states": {
"level": 3
},
"element": "h3",
"children": []
},
{
"role": "paragraph",
"name": "",
"description": "",
"states": {},
"element": "p1",
"children": [
{
"role": "text",
"name": "First paragraph.",
"description": "",
"states": {},
"children": []
}
]
}
]
},
{
"role": "paragraph",
"name": "",
"description": "",
"states": {},
"element": "p2",
"children": [
{
"role": "text",
"name": "Unlabelled section content.",
"description": "",
"states": {},
"children": []
}
]
},
{
"role": "complementary",
"name": "",
"description": "",
"states": {},
"element": "aside",
"children": [
{
"role": "heading",
"name": "Related",
"description": "",
"states": {
"level": 4
},
"element": "h4",
"children": []
}
]
},
{
"role": "heading",
"name": "ARIA heading",
"description": "",
"states": {
"level": 5
},
"element": "aria-heading",
"children": []
},
{
"role": "search",
"name": "",
"description": "",
"states": {},
"element": "search",
"children": [
{
"role": "text",
"name": "Search",
"description": "",
"states": {},
"children": []
},
{
"role": "searchbox",
"name": "Search",
"description": "",
"value": "kittens",
"states": {},
"element": "q",
"children": []
}
]
}
]
},
{
"role": "contentinfo",
"name": "",
"description": "",
"states": {},
"element": "footer",
"children": [
{
"role": "paragraph",
"name": "",
"description": "",
"states": {},
"element": "p3",
"children": [
{
"role": "text",
"name": "Footer text",
"description": "",
"states": {},
"children": []
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- document "Headings and landmarks"
- banner
- heading "Site title" [level=1]
- navigation
- link "Home"
- link "Docs"
- main
- heading "Section" [level=2]
- region "Updates"
- heading "Latest" [level=3]
- paragraph
- text: First paragraph.
- paragraph
- text: Unlabelled section content.
- complementary
- heading "Related" [level=4]
- heading "ARIA heading" [level=5]
- search
- text: Search
- searchbox "Search": kittens
- contentinfo
- paragraph
- text: Footer text
37 changes: 37 additions & 0 deletions common/src/web/accessibility/001-headings-and-landmarks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<!--
Licensed to the Software Freedom Conservancy (SFC) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The SFC licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html id="root">
<head>
<meta charset="utf-8">
<title>Headings and landmarks</title>
</head>
<body>
<header id="header"><h1 id="h1">Site title</h1><nav id="nav"><a id="home" href="#">Home</a> <a id="docs" href="#">Docs</a></nav></header>
<main id="main">
<h2 id="h2">Section</h2>
<section id="region" aria-label="Updates"><h3 id="h3">Latest</h3><p id="p1">First paragraph.</p></section>
<section id="plain-section"><p id="p2">Unlabelled section content.</p></section>
<aside id="aside"><h4 id="h4">Related</h4></aside>
<div id="aria-heading" role="heading" aria-level="5">ARIA heading</div>
<search id="search"><form id="form"><label for="q">Search</label><input id="q" type="search" value="kittens"></form></search>
</main>
<footer id="footer"><p id="p3">Footer text</p></footer>
</body>
</html>
Loading
Loading