Skip to content

Commit b440e5f

Browse files
fix(contained-list): explicitly set "list" role (#14019)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 92ffe66 commit b440e5f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/react/src/components/ContainedList/ContainedList.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,15 @@ function ContainedList({
9494
</LayoutConstraint>
9595
</div>
9696
{children && (
97-
<ul aria-labelledby={labelId}>
97+
/**
98+
* Webkit removes implicit "list" semantics when "list-style-type: none" is set.
99+
* Explicitly setting the "list" role ensures assistive technology in webkit
100+
* browsers correctly announce the semantics.
101+
*
102+
* Ref https://bugs.webkit.org/show_bug.cgi?id=170179#c1
103+
*/
104+
// eslint-disable-next-line jsx-a11y/no-redundant-roles
105+
<ul role="list" aria-labelledby={labelId}>
98106
{isActionSearch ? filteredChildren : renderedChildren}
99107
</ul>
100108
)}

0 commit comments

Comments
 (0)