Skip to content

Commit

Permalink
update test and add note
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed May 6, 2024
1 parent 053a70a commit 17aa88b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ const alwaysValid = [
{ code: '<style role="button" />;' },
{ code: '<sub role="button" />;' },
{ code: '<summary role="button" />;' },
{ code: '<summary role="listitem" />;' },
{ code: '<sup role="button" />;' },
{ code: '<th role="button" />;' },
{ code: '<time role="button" />;' },
Expand Down Expand Up @@ -373,6 +372,7 @@ const neverValid = [
{ code: '<select className="foo" role="listitem" />', errors: [expectedError] },
{ code: '<textarea className="foo" role="listitem" />', errors: [expectedError] },
{ code: '<tr role="listitem" />;', errors: [expectedError] },
{ code: '<summary role="listitem" />;', errors: [expectedError] },
/* Custom elements */
{ code: '<Link href="http://x.y.z" role="img" />', errors: [expectedError], settings: componentsSettings },
];
Expand Down
5 changes: 4 additions & 1 deletion src/util/isInteractiveElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 17aa88b

Please sign in to comment.