carbon icon indicating copy to clipboard operation
carbon copied to clipboard

[a11y]: Switcheritem tag giving accessibility error

Open Mahalakshmivignesh opened this issue 2 months ago • 8 comments

Package

@carbon/react

Browser

Chrome

Operating System

No response

Package version

1.58.1

React version

No response

Automated testing tool and ruleset

IBM Equal accessibility checker

Assistive technology

No response

Description

Hi all, <Switcheritem> element with only aria-label is giving accessibility error . the corresponding tag generated by the carbon has role as generic. Error - The ARIA attributes “aria-label” are not valid for the element with implicit ARIA role “generic” . The switcher item i am using is without href link. Hence, i believe, the role is assigned as generic. I tried to assign the role explicitly for the switcher item. but it is not an accepted property of the switcher item tag.

WCAG 2.1 Violation

No response

Reproduction/example

Unable to recreate the issue with the template

Steps to reproduce

Declare a header container with header panel code sample given below:

<HeaderPanel
						expanded={isSideNavExpanded}
						href="#test"
					>
						<Switcher aria-label="Switcher Container">
							<SwitcherItem aria-label="user">
								"user01"
							</SwitcherItem>
						</Switcher>
					</HeaderPanel>

Suggested Severity

None

Code of Conduct

Mahalakshmivignesh avatar Jun 12 '24 17:06 Mahalakshmivignesh