Failed prop type: unknown props found: tabindex
See original GitHub issuereact-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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.