microsoft / microsoft/TypeScript
Support HTMLElement.focus() Option FocusVisible
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
🔍 Search Terms
focusVisible
✅ Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- 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 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
💻 Use Cases
- What do you want to use this for? Ensuring the focused element is visibly focused.
- What shortcomings exist with current approaches? There isn't a workaround for this.
- What workarounds are you using in the meantime? There isn't a workaround for this.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Deklarationen von HTMLElement.focus() und FocusOptions in den DOM-Typdefinitionen von TypeScript zu finden. Prüfe, wie die vorhandenen Focus-Optionen dargestellt werden, und füge dann die Eigenschaft FocusVisible zur passenden Deklaration hinzu. Als erledigt gilt die Aufgabe, wenn TypeScript FocusVisible beim Aufruf von HTMLElement.focus() akzeptiert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 72/100