bug(matTooltip): Add option to set aria-labelledby rather than aria-describedby
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Reproduction
matTooltip is only able to apply aria-describedby to its host element. This is not optimal for host elements that have no aria-label or text contents.
#### Expected Behavior
What behavior were you expecting to see?
For a button with no textual label, eg a MatIconButton, a tooltip typically provides a label rather than a description.
Having matTooltip apply aria-labeledby rather than would be better in these cases.
At the very least, it would be good to have an Input to configure matTooltip's labeledby vs describedby preference.
Extra credit: change the default for obvious cases like MatIconButton.
#### Actual Behavior
What behavior did you actually see?
matTooltip applies aria-describedby, with no option to change this behavior.
#### Environment
- Angular: 12
- CDK/Material: 12
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any
Guía de contribución
Línea de trabajo
Comienza localizando la implementación de matTooltip y su comportamiento de accesibilidad existente. Comprueba cómo aplica aria-describedby a los hosts, define después la configuración compatible de aria-labelledby y verifica que el etiquetado de los tooltips funcione para botones sin etiqueta sin alterar el comportamiento de descripción.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- accessibility, frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100