Skip to content

Commit

Permalink
feat(InputField): add ariaLabel prop
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkaaa committed Dec 12, 2024
1 parent e994cb1 commit 7095271
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/InputField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ const InputField = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
ref={ref}
tabIndex={tabIndex !== undefined ? Number(tabIndex) : undefined}
list={list}
aria-labelledby={!label ? inputId : undefined}
aria-label={label}
aria-describedby={shown ? `${inputId}-feedback` : undefined}
aria-invalid={error ? true : undefined}
aria-autocomplete={ariaAutocomplete}
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/InputField/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Props extends Common.Globals, Common.SpaceAfter, Common.DataAtt
readonly type?: Type;
readonly inputMode?: InputMode;
readonly name?: string;
readonly label?: Common.Translation;
readonly label?: string;
readonly inlineLabel?: boolean;
readonly value?: string | number;
readonly defaultValue?: string | number;
Expand Down

0 comments on commit 7095271

Please sign in to comment.