Currently we are facing the problem that we need to add aria-describedby labels to the input for error messages.
Bootstrap also recomends this: https://getbootstrap.com/docs/5.3/forms/validation/#server-side
For invalid fields, ensure that the invalid feedback/error message is associated with the relevant form field using aria-describedby (noting that this attribute allows more than one id to be referenced, in case the field already points to additional form text).
In Rails you can do it like this: https://github.com/rails/rails/blob/d3b2fcb4ffee825f8e9ad8f4bacc859978aebaed/actionview/lib/action_view/helpers/form_helper.rb#L1766
# <%= form_for @post do |f| %>
# <%= f.label :title %>
# <%= f.text_field :title, aria: { describedby: f.field_id(:title, :error) } %>
# <%= tag.span("is blank", id: f.field_id(:title, :error) %>
# <% end %>
Any ideas how to add it for bootstrap_form?