[TypeScript] Switch is missing keyboardFocused class key
See original GitHub issueLooks 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:
- Created 5 years ago
- Comments:15 (11 by maintainers)
Top 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 >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’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:@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.