Skip to content

Removing tabIndex from component's attributes does not remove tabIndex once set #2528

Closed
@mczepiel

Description

@mczepiel

Once a tab index has been put in place "removing" by the method seen below only ever sets it to -1, which does what I'd expect in that the element isn't focused when tabbing, but it is still focusable by clicking directly on the element.

var attributes = {}
if (this.props.focusable) {
  attributes.tabIndex = 0;
}

return React.createElement("div", attributes, "test");

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions