Skip to content

tabbable breaks when processing an element with a "scope" attribute #832

@les-lim

Description

@les-lim

I have a situation where a TH element has both scope="col" and tabindex="0" attributes, which is causing Tabbable to break with "Cannot read properties of undefined (reading 'forEach').

index.js:425 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
at e (index.js:425:14)
at index.js:429:32
at Array.forEach ()
at e (index.js:425:14)
at e.tabbable (index.js:473:10)

Tabbable appears to be evaluating !! item.scope as true because the attribute is present, and assumes there is a ShadowRoot to process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions