From 5858a476314d575a0552c7f1a63cbffdd631cb3d Mon Sep 17 00:00:00 2001
From: Kate Higa <16447748+khiga8@users.noreply.github.com>
Date: Mon, 6 May 2024 14:17:19 -0400
Subject: [PATCH] update test and add note
---
.../no-interactive-element-to-noninteractive-role-test.js | 2 +-
src/util/isInteractiveElement.js | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js b/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js
index 9edb85e52..9adc44eb9 100644
--- a/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js
+++ b/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js
@@ -170,7 +170,6 @@ const alwaysValid = [
{ code: ';' },
{ code: ';' },
{ code: ';' },
- { code: ';' },
{ code: ';' },
{ code: '
| ;' },
{ code: ';' },
@@ -373,6 +372,7 @@ const neverValid = [
{ code: '', errors: [expectedError] },
{ code: '', errors: [expectedError] },
{ code: '
;', errors: [expectedError] },
+ { code: ';', errors: [expectedError] },
/* Custom elements */
{ code: '', errors: [expectedError], settings: componentsSettings },
];
diff --git a/src/util/isInteractiveElement.js b/src/util/isInteractiveElement.js
index 0f9714540..f73c77f5c 100644
--- a/src/util/isInteractiveElement.js
+++ b/src/util/isInteractiveElement.js
@@ -96,7 +96,10 @@ function checkIsInteractiveElement(tagName, attributes): boolean {
}
// Check in elementAXObjects for AX Tree associations for this element.
const isInteractiveAXElement = some(iterFrom(interactiveElementAXObjectSchemas), elementSchemaMatcher);
- if (isInteractiveAXElement) {
+ if (
+ isInteractiveAXElement
+ || tagName === 'summary' // TODO: Remove this hard-coded addition once axobject-query is updated.
+ ) {
return true;
}