Add aria-label option to text box component

This commit is contained in:
tidy-dev 2023-03-02 09:06:51 -05:00
parent 720a5fb542
commit f6b23e4f68

View file

@ -68,6 +68,9 @@ export interface ITextBoxProps {
/** Indicates if input field applies spellcheck */
readonly spellcheck?: boolean
/** Optional aria-label attribute */
readonly ariaLabel: string
}
interface ITextBoxState {
@ -255,6 +258,7 @@ export class TextBox extends React.Component<ITextBoxProps, ITextBoxState> {
tabIndex={this.props.tabIndex}
onContextMenu={this.onContextMenu}
spellCheck={this.props.spellcheck === true}
aria-label={this.props.ariaLabel}
/>
</div>
)