mi6 / mi6/ic-ui-kit

Internal issue 3030 - Aria-label on ic-status-tag overrides aria-label on parent component

Open
#3,481 2 comments 0 reactions 0 assignees View on GitHub

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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.