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.

Focus states don't work on checkbox inputs

See original GitHub issue

What you were expecting: WHen navigating through the CheckboxGroupInput inputs, there should be a visible indicator when using the TAB key

What happened instead: No way to indicate which of the checkboxes is focused

Steps to reproduce: Navigate to the post page Tab through the page Observe the lack of styles on focus

This is likely due to the styles being applied to the focus pseudo class of the span element. But the span element isn’t focusable via keyboard. Instead we should leverage the focus-within pseudo class to display focus styles if the child input element is focused

I can create a quick PR for this

insert short code snippets here

Other information:

Environment

  • React-admin version:
  • Last version that did not exhibit the issue (if applicable):
  • React version:
  • Browser:
  • Stack trace (in case of a JS error):

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fzaninottocommented, Jun 3, 2022

If the cause is the disableRipple (which we added for performance reasons), then we should remove this disableRipple, and let developers looking for performance re-add it in userland if they want.

0reactions
septentrion-730ncommented, Jun 2, 2022

Thanks for your report and for the fix you have provided!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove focus outline on clicked checkbox, but not ...
I only want to show the focus state when it's keyboard navigated to. How do I remove the focus state if clicked on?...
Read more >
Checkbox - UI Playbook
#Focus state ... Indicates that the focus in the document is currently on the checkbox. For the sake of aesthetics, it can be...
Read more >
focus-visible - CSS: Cascading Style Sheets - MDN Web Docs
The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA (User Agent) determines via heuristics ...
Read more >
Don't style :checked and :focus states identically - here's why
In the first set of checkboxes, "checked" and "focus" states are identical in style. If the checkbox is already checked ('Choice 1' is,...
Read more >
How to handle HTML checkbox events | HTML Form Guide
Now what we need to do is to attach an event to the checkbox so it checks its state each time it's changed...
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