invalid property

  1. @override
  2. @Accessor(key: 'aria-invalid')
dynamic invalid

Indicates the entered value does not conform to the format expected by the application.

If the value is computed to be invalid or out-of-range, the application author SHOULD set this attribute to true. User agents SHOULD inform the user of the error. Application authors SHOULD provide suggestions for corrections if they are known. Authors MAY prevent form submission when an associated form element has its aria-invalid attribute set to true.

When the user attempts to submit data involving a field for which aria-required is true, authors MAY use the aria-invalid attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the aria-invalid attribute on required widgets simply because the user has not yet entered data.

For future expansion, the aria-invalid attribute is an enumerated type. Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true had been provided. If the attribute is not present, or its value is false, or its value is an empty string, the default value of false applies.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid

Implementation

@override
@Accessor(key: 'aria-invalid')
dynamic get invalid =>
    (props[_$key__invalid___$AriaPropsMixin] ?? null) as dynamic;
  1. @override
  2. @Accessor(key: 'aria-invalid')
void invalid=(dynamic value)

Indicates the entered value does not conform to the format expected by the application.

If the value is computed to be invalid or out-of-range, the application author SHOULD set this attribute to true. User agents SHOULD inform the user of the error. Application authors SHOULD provide suggestions for corrections if they are known. Authors MAY prevent form submission when an associated form element has its aria-invalid attribute set to true.

When the user attempts to submit data involving a field for which aria-required is true, authors MAY use the aria-invalid attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the aria-invalid attribute on required widgets simply because the user has not yet entered data.

For future expansion, the aria-invalid attribute is an enumerated type. Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true had been provided. If the attribute is not present, or its value is false, or its value is an empty string, the default value of false applies.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid

Implementation

@override
@Accessor(key: 'aria-invalid')
set invalid(dynamic value) => props[_$key__invalid___$AriaPropsMixin] = value;