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

Aperta
#29,116 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
package: core type: bug
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

### 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_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.