From d10e77525c11dfa013c01dbfcb0d37bac3fd967b Mon Sep 17 00:00:00 2001 From: sangikhan29 <109125374+sangikhan29@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:06:35 -0400 Subject: [PATCH] fix test error --- __mocks__/genInteractives.js | 4 ++-- src/util/isInteractiveRole.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__mocks__/genInteractives.js b/__mocks__/genInteractives.js index e6ee0c95b..5cb323040 100644 --- a/__mocks__/genInteractives.js +++ b/__mocks__/genInteractives.js @@ -136,13 +136,13 @@ const interactiveRoles = [] ) .filter((role) => ( !roles.get(role).abstract - && roles.get(role).superClass.some((klasses) => includes(klasses, 'widget')) + && roles.get(role).superClass.some((klasses) => includes(klasses, 'widget', 'window')) )); const nonInteractiveRoles = roleNames .filter((role) => ( !roles.get(role).abstract - && !roles.get(role).superClass.some((klasses) => includes(klasses, 'widget')) + && !roles.get(role).superClass.some((klasses) => includes(klasses, 'widget', 'window')) // 'toolbar' does not descend from widget, but it does support // aria-activedescendant, thus in practice we treat it as a widget. diff --git a/src/util/isInteractiveRole.js b/src/util/isInteractiveRole.js index 20513bd29..b3aeda7dd 100644 --- a/src/util/isInteractiveRole.js +++ b/src/util/isInteractiveRole.js @@ -8,7 +8,7 @@ import flatMap from 'array.prototype.flatmap'; const roles = [...rolesMap.keys()]; const interactiveRoles = roles.filter((name) => ( !rolesMap.get(name).abstract - && rolesMap.get(name).superClass.some((klasses) => includes(klasses, 'widget', `window`)) + && rolesMap.get(name).superClass.some((klasses) => (includes(klasses, 'widget', 'window'))) )); // 'toolbar' does not descend from widget, but it does support