Skip to content

Commit 1f56765

Browse files
committed
limit style changes to only non-selectable elements
1 parent bef3a24 commit 1f56765

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/react/src/ActionList/ActionList.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187

188188
/* active state [aria-current] */
189189
&:where([data-active]),
190-
&:where([aria-selected='true']) {
190+
&:where([aria-selected='true']):not([data-selectable]) {
191191
background: var(--control-transparent-bgColor-selected);
192192

193193
/* provides a visual indication of the current item for Windows high-contrast mode */

packages/react/src/ActionList/Item.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ const UnwrappedItem = <As extends React.ElementType = 'li'>(
255255
ref={listSemantics ? forwardedRef : null}
256256
data-variant={variant === 'danger' ? variant : undefined}
257257
data-active={active ? true : undefined}
258+
data-selectable={includeSelectionAttribute ? true : undefined}
258259
data-inactive={inactiveText ? true : undefined}
259260
data-has-subitem={slots.subItem ? true : undefined}
260261
data-has-description={slots.description ? true : false}

0 commit comments

Comments
 (0)