secretField.tsx 558 B

1234567891011121314
  1. import InputField, {InputFieldProps} from './inputField';
  2. export interface SecretFieldProps extends Omit<InputFieldProps, 'type'> {}
  3. function SecretField(props: SecretFieldProps) {
  4. // XXX: We explicitly give the password field a aria textbox role. This field
  5. // does not typically have a role, but for testability reasons it's preferred
  6. // for it to have a role. See [0]
  7. //
  8. // [0]: https://github.com/testing-library/dom-testing-library/issues/567
  9. return <InputField {...props} type="password" role="textbox" />;
  10. }
  11. export default SecretField;