Skip to content

Commit

Permalink
Merge pull request #599 from SUI-Components/feat/SCMI-50332/accessibi…
Browse files Browse the repository at this point in the history
…lity-improve-form-select

🔍  feat(components/form/select): add support for aria label
  • Loading branch information
nachoAdevinta committed Jun 26, 2023
2 parents 3c7bb79 + c745bea commit bbe06a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/form/select/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import cx from 'classnames'
import PropTypes from 'prop-types'

export default function FormSelect({
ariaLabel,
className,
disabled,
onChange,
Expand All @@ -19,6 +20,7 @@ export default function FormSelect({

return (
<select
aria-label={ariaLabel}
className={selectClassName}
disabled={disabled}
onChange={wrappedOnChange}
Expand All @@ -42,6 +44,10 @@ FormSelect.displayName = 'FormSelect'

// Remove these comments if you need
FormSelect.propTypes = {
/**
* Aria label to be added
*/
ariaLabel: PropTypes.string,
/**
* Classname to be added along
*/
Expand Down

0 comments on commit bbe06a2

Please sign in to comment.