microsoft / microsoft/TypeScript
Support HTMLElement.focus() Option FocusVisible
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.3k
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 132
Descripción
🔍 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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza localizando las declaraciones de HTMLElement.focus() y FocusOptions en las definiciones de tipos DOM de TypeScript. Comprueba cómo se representan las opciones de focus existentes y, a continuación, añade la propiedad FocusVisible a la declaración correspondiente. El trabajo estará terminado cuando TypeScript acepte FocusVisible al llamar a HTMLElement.focus().
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 72/100