Skip to content

Commit

Permalink
Callback should handle non HTMLElement type
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Sep 12, 2023
1 parent 23234d6 commit 22e1d8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/components/src/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ let openModalCount = 0;
* for the best a11y experience.
*
* See: https://github.com/WordPress/gutenberg/issues/54106.
* @param tabbables HTMLElement[] an array of tabbable elements.
* @return HTMLElement the first tabbable element that is not a close button.
* @param tabbables Element[] an array of tabbable elements.
* @return Element the first tabbable element that is not a close button.
*/
function getFirstTabbableElement( tabbables: HTMLElement[] ) {
function getFirstTabbableElement( tabbables: Element[] ) {
// Attempt to locate tabbable outside of the header portion of the Modal.
const firstContentTabbable = tabbables.find( ( tabbable ) => {
return tabbable.closest( '.components-modal__header' ) === null;
Expand Down

0 comments on commit 22e1d8c

Please sign in to comment.