Inputs or other elements requiring focus in <Slides> are unfocusable or able to be edited.
See original GitHub issuepure-react-carousel
version: 1.27.1react
version: 16.13.1browser
used: Chrome Version 84.0.4147.135 (Official Build) (64-bit)node
version: v12.17.0
Relevant code or config:
N/A
What you did:
We have a series of images in a slider, each slide having its own title (input) and description (textarea). We want people to be able to write in the input(s) and textarea(s), respectfully.
What happened:
You can’t seem to focus on the inputs at all, or be able to type in them.
Reproduction:
Minimal code repository (bootstrapped with create-react-app):
https://github.com/princefishthrower/carousel-test
Problem description:
Usability
Suggested solution:
My guess is that something with drag detection is blocking the ability to focus on any other element within the slide. I already tried a few z-index tricks, but that didn’t help. A possible workaround I could envision is turning off drag functionality until an actual drag event is detected, didn’t try this yet.
Can you help us fix this issue by submitting a pull request?
Maybe. I haven’t looked at the source code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Focus & Keyboard Operability - Usability & Web Accessibility
When an HTML element is able to handle keyboard input, it is said to have focus. Exactly one element is able to have...
Read more >Element with presentational children has no focusable ...
This rule assumes that elements that are part of sequential focus navigation do not immediately blur, or move focus to another element.
Read more >Focus management and inert
An interactive element gains focus when: It has been navigated to via the Tab key,; it is clicked on, following an anchor that...
Read more >Control focus with tabindex - web.dev
To focus an element, press the Tab key or call the element's focus() method. HTML; CSS. Result; Skip Results Iframe.
Read more >Focus and selection - Inputs - Human Interface Guidelines
Focus visually identifies the onscreen object that will respond to interactions like a mouse click, a keyboard command, or a button press on...
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
I had a similar issue with a modal (nested within a slide) which contained an input. The input was un-focusable, regardless of click or tab. The only solution we could use was adding
autoFocus
to the input.I’m experiencing this issue too - a feature which relies on a button’s focus state is not working, because the focus event is being prevented from triggering. It works with keyboard but not with mouse.