Skip to content

Documentation or types incorrect for tabIndex type? #3408

@ghost

Description

If you take a look at the documentation, it uses a string: https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes

<div tabIndex="-1" /> // Just like node.tabIndex DOM API

But the types state that it should be a number:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/v16/index.d.ts#L1767

tabIndex?: number;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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