Focus-Visible support

UI Components for React
Post Reply
hfilosa
Posts: 1
Joined: 23 Aug 2021, 21:10

23 Aug 2021, 21:23

I'm trying to figure out if PrimeReact has support for a [https://developer.mozilla.org/en-US/doc ... us-visible][focus-visible] pseudoselector. This is useful for things like selectors where you want an indicator when the user has the element in focus through tab navigation, but not when they've just clicked on the input. Since the pseudo-selector is not supported by IE and Safari we currently use the [https://github.com/WICG/focus-visible][focus-visible library] to apply the class as needed. It would be fantastic if PrimeReact took care of this as well, but it appears focus classes are applied irrespective of their cause being a click, tab, etc (ex. p-inputswitch-focus). This doesn't seem too useful, couldn't we just use the well supported :focus selector? Is there some way to get the focus-visible selector for "free" in PrimeReact, or do we have to continue using our library?

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests