Skip to content

Commit

Permalink
If ariaLabel hide label for screen-readers
Browse files Browse the repository at this point in the history
  • Loading branch information
ssb-cgn committed Nov 30, 2023
1 parent 7a94d38 commit 2a21a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Input/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Input = forwardRef(({

return (
<div className={`ssb-input${negative ? ' negative' : ''}${error ? ' error' : ''}${size === 'lg' ? ' input-lg' : ''}${className ? ` ${className}` : ''}`}>
{label && <label htmlFor={inputId}>{label}</label>}
{label && <label aria-hidden={ariaLabel ? true : undefined} htmlFor={inputId}>{label}</label>}
<div ref={ref} className="input-wrapper" role={searchField ? 'search' : role} aria-label={ariaLabelWrapper}>
<input
id={inputId}
Expand Down

0 comments on commit 2a21a3a

Please sign in to comment.