Internal issue 3030 - Aria-label on ic-status-tag overrides aria-label on parent component
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
I have a component that wraps an ic-status-tag and is used inside a named container. I would like to add an aria-label to the component so that a screen reader will read out the name of the container, then the status of the ic-status-tag (using role=status via the announced prop). Currently, the screen reader prioritises the aria-label set inside the host of the ic-status-tag: “Status”, and will read “Status status good” for example. When there are multiple containers with different names with changing statuses, the screen reads “Status status good” for all of them. If the aria-label is removed from the ic-status-tag host, (tested with the browser devTools) it should read “'Container Name' status good” which is the desired behaviour.
<my-status-tag-wrapper aria-label=”container name”>
..Good..
Is it possible to remove the aria-label=“Status” from the ic-status-tag :-<Host role= {announced ? "status" : null} aria-label="Status">,
or maybe add a prop so that the desired aria-label can be passed in, e.g. : <Host role= {announced ? "status" : null} aria-label={customAria ?? "Status">
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ic-status-tag host implementation shown in the issue, focusing on the announced prop, role="status", and its hard-coded aria-label. Reproduce the nested my-status-tag-wrapper example with a screen reader or browser accessibility tools, then verify that the container name and status are announced without the inner label overriding the parent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100