diff --git a/internal/driver/chrome/driver.go b/internal/driver/chrome/driver.go
index 97498ee..074cae3 100644
--- a/internal/driver/chrome/driver.go
+++ b/internal/driver/chrome/driver.go
@@ -413,8 +413,13 @@ func (d *Driver) Hierarchy(ctx context.Context) (string, error) {
visit(document);
return out;
}
+ const TAPPABLE_ROLES = [
+ 'button', 'link', 'checkbox', 'radio', 'switch', 'tab', 'option',
+ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'treeitem'];
const clickableSet = new Set(deepQuery(
- 'a, button, input, select, textarea, [role="button"], [onclick]'));
+ 'a, button, input, select, textarea, ' +
+ TAPPABLE_ROLES.map(role => '[role="' + role + '"]').join(', ') +
+ ', [onclick]'));
const editableSet = new Set(deepQuery(
'input, textarea, [contenteditable]').filter(isEditableElement));
function buildTree(el, isRoot) {
diff --git a/internal/driver/chrome/testdata/fact-parity.html b/internal/driver/chrome/testdata/fact-parity.html
index dba230a..c29d0ed 100644
--- a/internal/driver/chrome/testdata/fact-parity.html
+++ b/internal/driver/chrome/testdata/fact-parity.html
@@ -56,6 +56,22 @@
bio
+
+ link
+ checkbox
+ radio
+ switch
+ tab
+
+
+
+ tree item
+
attribute click
delegating root
plain
diff --git a/pkg/spec/src/web-runtime.ts b/pkg/spec/src/web-runtime.ts
index 244bc34..5e4b89b 100644
--- a/pkg/spec/src/web-runtime.ts
+++ b/pkg/spec/src/web-runtime.ts
@@ -569,7 +569,22 @@ function sanitizeAt(value: unknown, depth: number, seen: WeakSet