Skip to content

[a11y]: Inside the Switcher we are using SwitcherDivider getting error Ensure that lists are structured correctly #20619

@Meena9

Description

@Meena9

Package

@carbon/react

Browser

Chrome, Safari, Firefox, Edge

Operating System

Windows

Package version

1.89.0

React version

18.3.1

Automated testing tool and ruleset

axe-core/playwright and Axe rule ID List

Assistive technology

No response

Description

<ul> and <ol> must only directly contain <li>, <script> or <template> elements
Element location: .cds--switcher
Element source <ul class="cds--switcher">

WCAG 2.1 Violation

List element has direct children that are not allowed: hr

Reproduction/example

<Switcher expanded={showRightPanel}> <SwitcherDivider /> <SwitcherItem/></ Switcher>

Steps to reproduce

add Switcher component then inside that add SwitcherDivider and also add SwitcherItem

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Code of Conduct

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions