Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SingleDatePicker - Cannot open dialog from question mark button using Enter key. #2255

Open
hardysabs2 opened this issue Apr 23, 2024 · 0 comments

Comments

@hardysabs2
Copy link

hardysabs2 commented Apr 23, 2024

react-dates version
react-dates@21.8.0

Describe the bug
After navigating to the question mark button using the tab key, hitting the enter key does not open the short cuts dialog, only hitting question mark does.

This does not seem to be the case on story book (https://react-dates.github.io/react-dates/?path=/story/singledatepicker-sdp--default) but I cannot figure out why.

Source code (including props configuration)
`import SingleDatePicker from "react-dates/lib/components/SingleDatePicker";
import "react-dates/initialize";

    <SingleDatePicker
      displayFormat="DD/MM/YYYY"
      disabled={false}
      withPortal
      id={1}
      numberOfMonths={2}
      placeholder="Select Date"
      showDefaultInputIcon={true}
      date={date}
      readOnly={true}
      onDateChange={onDateChange}
      focused={this.state.focused}
      renderMonth="MMMM YYYY"
    />`

Desktop (please complete the following information):
` - OS: Windows 10 Pro

  • Browser Chrome
  • Version 123.0.6312.123`

Additional context
It seems that also when you include showDefaultInputIcon the enter key stops working on the ? button. However when you do not include showDefaultInputIcon there is no way to prevent auto open on focus and on date selection focus is lost so aria does not audio the component content update, but the top level page.

@hardysabs2 hardysabs2 changed the title Cannot open dialog from question mark button using Enter key. showDefaultInputIcon - Cannot open dialog from question mark button using Enter key. Apr 23, 2024
@hardysabs2 hardysabs2 changed the title showDefaultInputIcon - Cannot open dialog from question mark button using Enter key. SingleDatePicker - Cannot open dialog from question mark button using Enter key. Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant