Skip to content

Commit

Permalink
fix(search): use undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore committed Jun 26, 2024
1 parent 1509652 commit 58b3290
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ exports[`DataTable behaves as expected selection should render and match snapsho
>
<div
aria-expanded="false"
aria-label=""
class="cds--search-magnifier"
role=""
tabindex="-1"
>
<svg
Expand Down Expand Up @@ -936,9 +934,7 @@ exports[`DataTable renders as expected - Component API should render and match s
>
<div
aria-expanded="false"
aria-label=""
class="cds--search-magnifier"
role=""
tabindex="-1"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ exports[`TableToolbarSearch renders as expected - Component API should render 1`
>
<div
aria-expanded="false"
aria-label=""
class="cds--search-magnifier"
role=""
tabindex="-1"
>
<svg
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ const Search = React.forwardRef<HTMLInputElement, SearchProps>(function Search(
however, it does not need a keyboard event bc the input element gets focus on keyboard nav and expands that way*/}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<div
aria-label={onExpand ? 'button' : ''}
aria-label={onExpand ? 'button' : undefined}
aria-labelledby={onExpand ? uniqueId : undefined}
role={onExpand ? 'button' : ''}
role={onExpand ? 'button' : undefined}
className={`${prefix}--search-magnifier`}
onClick={onExpand}
onKeyDown={handleExpandButtonKeyDown}
Expand Down

0 comments on commit 58b3290

Please sign in to comment.