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.

[TypeScript] Switch is missing keyboardFocused class key

See original GitHub issue

Looks like the definition for Switch or one of its inherited definitions was updated recently which removed the keyboardFocused class key.

I wonder if SwitchBase’s SwitchBaseClassKey definition should also include IconButtonClassKey? https://github.com/mui-org/material-ui/blob/466c01fc7e7bc76adf5ad34da125daff43a1b206/src/internal/SwitchBase.d.ts#L23

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
ianschmitzcommented, Apr 9, 2018

I’m happy either way. Thanks @oliviertassinari !

I agree keyboard focused states are super useful. We can do some pretty nifty styling with it. We were able to completely redesign the styling of MUI’s Switch component to put our own touch on it, while still keeping the awesome API of MUI. For example here is our switch with the first one currently keyboard focused:

image

1reaction
oliviertassinaricommented, Apr 17, 2018

@ianschmitz I’m adding this issue to the v1 milestone. We need to sort that out before the stable release. We might need to introduce a breaking change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[TypeScript] Switch is missing keyboardFocused class key
[TypeScript] Switch is missing keyboardFocused class key #10976 ... both the Switch and IconButton need the keyboard focused state.
Read more >
Property 'value' does not exist on type EventTarget in TypeScript
To solve this problem, use the $any typecast function ($any($event.target).value) to stop the type checking in the template. Read more here.
Read more >
Control focus with tabindex - web.dev
Insert an element into the tab order # ; 1. <div class="instructions"> ; 2. (click here, then press <code>TAB</code>) ; 3. </div> ;...
Read more >
Keyboard-navigable JavaScript widgets - Accessibility | MDN
Using tabindex. By default, when people use the tab key to browse a webpage, only interactive elements (like links, form controls) get focused....
Read more >
Keyboard: keydown and keyup - The Modern JavaScript Tutorial
Keyboard events should be used when we want to handle keyboard actions (virtual keyboard also ... Focus on the input field and press...
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