Skip to content

Commit 2ce4f0d

Browse files
fix(EuiSelectable): simplify aria-activedescendant assignment for improved readability
1 parent 10eca7e commit 2ce4f0d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/eui/src/components/selectable/selectable.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -755,12 +755,11 @@ export class EuiSelectable<T = {}> extends Component<
755755
value={searchValue}
756756
onChange={this.onSearchChange}
757757
listId={this.optionsListRef.current ? this.listId : undefined} // Only pass the listId if it exists on the page
758-
{...(activeOptionIndex != null
759-
? {
760-
'aria-activedescendant':
761-
this.makeOptionId(activeOptionIndex),
762-
}
763-
: {})}
758+
aria-activedescendant={
759+
activeOptionIndex != null
760+
? this.makeOptionId(activeOptionIndex)
761+
: undefined
762+
}
764763
placeholder={placeholderName}
765764
isPreFiltered={!!isPreFiltered}
766765
optionMatcher={optionMatcher!}

0 commit comments

Comments
 (0)