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

Offen
#29,116 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
package: core type: bug
Vorherrschende Sprache
TypeScript
Sterne
52.7k
Forks
13.3k
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
51

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.