microsoft / microsoft/TypeScript
Support HTMLElement.focus() Option FocusVisible
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
### 🔍 Search Terms
focusVisible
### ✅ Viability Checklist
- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
### ⭐ Suggestion
Typescript should now support the FocusVisible property of FocusOptions.
### 📃 Motivating Example
The FocusVisible FocusOption is now supported on all major browsers except Samsung Internet. It is supported on all desktop browsers. It was stated under [the previous issue on the topic](https://github.com/microsoft/TypeScript/issues/61458) that a new issue should be opened when the feature is more widely supported, and it is now more widely supported.
Source: [HTMLElement: focus() method](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility)
### 💻 Use Cases
1. What do you want to use this for? Ensuring the focused element is visibly focused.
2. What shortcomings exist with current approaches? There isn't a workaround for this.
3. What workarounds are you using in the meantime? There isn't a workaround for this.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando le dichiarazioni di HTMLElement.focus() e FocusOptions nelle definizioni dei tipi DOM di TypeScript. Verifica come sono rappresentate le opzioni di focus esistenti, quindi aggiungi la proprietà FocusVisible alla dichiarazione appropriata. Il lavoro è completato quando TypeScript accetta FocusVisible durante la chiamata a HTMLElement.focus().
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 72/100