diff --git a/packages/orbit-components/src/Select/index.tsx b/packages/orbit-components/src/Select/index.tsx index 104043fdba..e550f9fb14 100644 --- a/packages/orbit-components/src/Select/index.tsx +++ b/packages/orbit-components/src/Select/index.tsx @@ -40,6 +40,7 @@ const Select = React.forwardRef((props, ref) => { customValueText, insideInputGroup, dataAttrs, + ariaLabel, } = props; const filled = !(value == null || value === ""); @@ -67,6 +68,7 @@ const Select = React.forwardRef((props, ref) => { className={cx("relative block", spaceAfter && spaceAfterClasses[spaceAfter])} ref={inputRef} style={{ width }} + aria-label={label?.toString() || ariaLabel?.toString()} > {label && !inlineLabel && ( ((props, ref) => { onBlur={onBlur} onChange={onChange} tabIndex={tabIndex ? Number(tabIndex) : undefined} - id={selectId} required={required} ref={ref} aria-describedby={shown ? `${selectId}-feedback` : undefined} diff --git a/packages/orbit-components/src/Select/types.d.ts b/packages/orbit-components/src/Select/types.d.ts index b955c1275d..ecf5936dfa 100644 --- a/packages/orbit-components/src/Select/types.d.ts +++ b/packages/orbit-components/src/Select/types.d.ts @@ -35,4 +35,5 @@ export interface Props extends Common.Globals, Common.SpaceAfter, Common.DataAtt readonly insideInputGroup?: boolean; readonly inlineLabel?: boolean; readonly customValueText?: Common.Translation; + readonly ariaLabel?: Common.Translation; }