diff --git a/lib/simple_form/components/html5.rb b/lib/simple_form/components/html5.rb
index 0fe0f223..d2d2949f 100644
--- a/lib/simple_form/components/html5.rb
+++ b/lib/simple_form/components/html5.rb
@@ -11,7 +11,7 @@ module SimpleForm
input_html_options[:required] = has_required?
input_html_options[:'aria-required'] = has_required? || nil
- input_html_options[:'aria-invalid'] = has_errors?
+ input_html_options[:'aria-invalid'] = has_errors? || nil
nil
end