question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed prop type: unknown props found: tabindex

See original GitHub issue

react-dates version react-dates@21.5.0

Describe the bug Warning: Failed prop type: withStyles(SingleDatePicker): unknown props found: tabindex

Source code (including props configuration) Add tabIndex as prop to react-dates component

<DateRangePicker
  tabIndex={ this.startingTabIndex() }
  startDate={this.state.startDate}
  startDateId="your_unique_start_date_id"
  endDate={this.state.endDate}
  endDateId="your_unique_end_date_id"
  onDatesChange={({ startDate, endDate }) => this.setState({ startDate, endDate })}
  focusedInput={this.state.focusedInput}
  onFocusChange={focusedInput => this.setState({ focusedInput })}
/>

Additional context How is this not possible? What kind of monsters run this thing?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
backwardokcommented, Nov 26, 2019

Yes, for accessibility purposes, it’s generally not advised to use any tabindex value that’s higher than 0. Using tabindex=0 would be unnecessary for something that’s already in the tab flow and using tabindex=-1 to prevent tab focus would necessitate also removing that content for everyone.

One of the reasons to not use a tabindex higher than 0 is because of how that impacts the taborder on the page. I created a codepen to illustrate the tab order in a page to demonstrate the behavior that happens when using positive tabindex values on the page.

2reactions
ljharbcommented, Nov 18, 2019

There’s no need for the hostility of the “monsters” comment.

Have you read https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html ? setting a starting tab index (that’s not 0 or -1) is bad for users and for the web.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed prop type: unknown props found: tabindex · Issue #1865
setting a starting tab index (that's not 0 or -1) is bad for users and for the web. 2
Read more >
Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >
Link: unknown props found: onClick - reactjs - Stack Overflow
When I try to add onClick to link I am getting an error. import React from 'react'; import PropTypes from 'prop- ...
Read more >
API - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >
@types/react@18.0.26 - jsDocs.io
Documentation for npm package @types/react@18.0.26 - jsDocs.io. ... Identifies the element that provides an error message for the object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found