Keep help text from following an input, so Bitwarden stops reading it as a label

Scopes on Admin → SSO still opened Bitwarden's menu after its placeholder
went, offering a "New identity".

Bitwarden takes the text after a field as part of the field's label, and in
the form theme the help paragraph was the input's next sibling. The Scopes
help explains the `email` scope and says the word twice, which made the
field an identity's email address — whatever autocomplete and data-bwignore
said on the input itself. The diagnosis came from inspecting the live page;
the placeholder removed in the previous commit was a second place the word
stood, not the one that mattered.

form_row now puts the widget in an element of its own, so nothing follows an
input as a sibling. `display: contents` on the wrapper, so the row lays out
exactly as before: measured 8px above and below the input, full width,
unchanged. This covers every field with help text, not this one.

Not checked against Bitwarden itself, which this environment does not have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Paul LütznerandClaude Opus 5.5 committed 2026-10-13 22:59:15 +02:00
1 parent 28cce0c9c3
commit 12faf4d8bd
2 files changed
+40 -1

No files matched your search

@@ -27,7 +27,18 @@ a collection row — is one field to the reader and should stay tight.
{% block form_row %}
<div class="flex flex-col gap-2">
{{ form_label(form) }}
{{ form_widget(form) }}
{# The widget in an element of its own, so that nothing follows the
input as a sibling. Bitwarden reads the text after a field as part of
its label, and the help text is exactly that: on Admin → SSO the
Scopes help says "email" twice, which made the field an identity's
email address to it and opened its menu there — with `off` and its
own opt-out attribute both set, and after the placeholder that also
said "email" had gone. `contents`, so the wrapper exists for whoever
walks the DOM and not for the layout: the input is still a flex
child of the row. #}
<div class="contents">
{{ form_widget(form) }}
</div>
{{ form_errors(form) }}
{{ form_help(form) }}
</div>