Skip to content

Introduce DisplayFormElement for embedding HTML in CompatForm - #385

Merged
lippserd merged 5 commits into
mainfrom
feature/display-form-element
Jun 25, 2026
Merged

lippserd merged 5 commits into
mainfrom
feature/display-form-element

Conversation

@jrauh01

@jrauh01 jrauh01 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Allows arbitrary ValidHtml content to be placed inside a CompatForm control group, complete with an optional label and description icon. The companion CSS rule ensures the wrapper div stretches to fill available horizontal space within the flex layout.

This is used for the new two-factor auth feature in Icinga Web.

@jrauh01 jrauh01 self-assigned this May 27, 2026
@cla-bot cla-bot Bot added the cla/signed label May 27, 2026
@jrauh01
jrauh01 force-pushed the feature/display-form-element branch 2 times, most recently from 0164031 to af8b156 Compare May 27, 2026 13:28
@TheSyscall TheSyscall mentioned this pull request May 28, 2026
@jrauh01
jrauh01 force-pushed the feature/display-form-element branch from af8b156 to cff9642 Compare June 10, 2026 05:49
@lippserd
lippserd requested a review from TheSyscall June 23, 2026 08:20
Comment thread src/Compat/DisplayFormElement.php Resolved
Comment thread src/Compat/DisplayFormElement.php Resolved
Comment thread src/Compat/DisplayFormElement.php Resolved
@jrauh01

jrauh01 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

As the accessibility features are not yet very well developed in the IPL and we don't want to implement a half-baked solution, but rather think of it more carefully, I did not add it for now.

@jrauh01
jrauh01 requested a review from TheSyscall June 25, 2026 07:02
jrauh01 added 4 commits June 25, 2026 09:23
Allows arbitrary `ValidHtml` content to be placed inside a `CompatForm`
control group, complete with an optional label and description icon.
The companion CSS rule ensures the wrapper div stretches to fill
available horizontal space within the flex layout.
The previous falsy check treated a description of `0` as absent, suppressing the
info icon even though a non-null value was set.
When content implements `HtmlElementInterface`, the info icon is now linked
to the content element via `aria-describedby`, so screen readers announce
the description when the element receives focus. The icon itself gains
`aria-hidden="true"` and `role="img"` to prevent it from being read out twice.

If the content element has no `id`, one is generated and set automatically.
The accessibility features in the IPL are not yet very well developed. We don't
want to implement a half-baked solution, but rather think of it more carefully.

This reverts commit ae30033.
@jrauh01
jrauh01 force-pushed the feature/display-form-element branch from 7b1d3ff to 01f0d42 Compare June 25, 2026 07:23
Comment thread src/Compat/DisplayFormElement.php Resolved
Co-authored-by: Alexander Rieß <alexander.riess@icinga.com>
@jrauh01
jrauh01 requested a review from TheSyscall June 25, 2026 07:28

@TheSyscall TheSyscall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@lippserd
lippserd merged commit 8076200 into main Jun 25, 2026
14 checks passed
@lippserd
lippserd deleted the feature/display-form-element branch June 25, 2026 12:09
@lippserd lippserd added this to the 0.14.0 milestone Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants