ionic-team / ionic-team/ionic-framework

feat: improved `aria-label` for the searchbar's clear button, or a way for consuming apps to customize this value

Abierto
#29,116 2 comentarios 2 reacciones 0 asignados Ver en GitHub
package: core type: bug
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

The clear button on the `ion-searchbar` has an `aria-label` of "reset" ([code here](https://github.com/ionic-team/ionic-framework/blob/5a5f330705f77a8971119fad448101a5504d8e5e/core/src/components/searchbar/searchbar.tsx#L636)), which is not clear enough for screenreader users. The label should be more descriptive, perhaps “clear search input”.

### Describe the Use Case

"Reset" may be unclear to screenreader users, and so the button's `aria-label` should be more descriptive.

### Describe Preferred Solution

Two possible solutions:

1. Add a prop so that consuming applications can optionally pass their own `aria-label` for the searchbar's "clear button".
2. Update the existing `aria-label` ([here](https://github.com/ionic-team/ionic-framework/blob/5a5f330705f77a8971119fad448101a5504d8e5e/core/src/components/searchbar/searchbar.tsx#L636)) to be something more descriptive, like "clear search input".

Thank you!!

### Describe Alternatives

_No response_

### Related Code

_No response_

### Additional Information

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.