diff --git a/packages/ui-dom-utils/src/__tests__/findTabbable.test.tsx b/packages/ui-dom-utils/src/__tests__/findTabbable.test.tsx index b0d6860dbf..5694bc0d35 100644 --- a/packages/ui-dom-utils/src/__tests__/findTabbable.test.tsx +++ b/packages/ui-dom-utils/src/__tests__/findTabbable.test.tsx @@ -43,9 +43,6 @@ describe('findTabbable', async () => { -
- -
) /* eslint-enable jsx-a11y/no-noninteractive-tabindex */ diff --git a/packages/ui-dom-utils/src/findFocusable.ts b/packages/ui-dom-utils/src/findFocusable.ts index a4dbdb8624..7fd7e6a54d 100644 --- a/packages/ui-dom-utils/src/findFocusable.ts +++ b/packages/ui-dom-utils/src/findFocusable.ts @@ -83,12 +83,7 @@ function findFocusable( function hidden(element: Element | Node) { const cs = getComputedStyle(element) - return ( - (cs.display !== 'inline' && - (element as HTMLElement).offsetWidth <= 0 && - (element as HTMLElement).offsetHeight <= 0) || - cs.display === 'none' - ) + return cs.display === 'none' } function positioned(element: Element | Node) { diff --git a/yarn.lock b/yarn.lock index 1a94550a5a..c4026e58fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3029,7 +3029,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.22.6": +"@babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.22.6": version: 7.22.6 resolution: "@babel/runtime@npm:7.22.6" dependencies: