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

Open Beginner friendly
#29,116 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start in core/src/components/searchbar/searchbar.tsx at the clear button's aria-label. Decide whether the existing label should become more descriptive or whether consuming applications need a customization prop, then verify that the clear button exposes the intended accessible name.

Written by the indexing model from the issue text.

Description

package: core type: bug
Prerequisites
Describe the Feature Request

The clear button on the ion-searchbar has an aria-label of "reset" (code here), 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) to be something more descriptive, like "clear search input".

Thank you!!

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
2d 20h
Merged PRs (30d)
35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/ionic-framework

All issues in ionic-team/ionic-framework

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.