Skip to content

feat(ux): mark required fields with a red asterisk (#414) - #499

Merged
DeepDiver1975 merged 1 commit into
mainfrom
feat/414-pflichtfelder
Sep 27, 2026
Merged

DeepDiver1975 merged 1 commit into
mainfrom
feat/414-pflichtfelder

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Fixes #414

What

A required field looked exactly like an optional one until the press that failed on it (#412). The shared HeaderedContentControl.field template now has a RequiredMarker part: an asterisk in ErrorBrush after the caption, switched on by Classes="field required". The template was merged into one in #412 for exactly this reason, so this is a style rule plus a class on each view, with no second template.

  • Asterisk and colour together. The issue's own concern was that a colour-only signal is single-channel and gets lost to glare in the ELW.
  • Scope: every field backed by a Required *Error. That is 19 wrappers across ETB, Aufgaben (dialog and dock), Beteiligte, Kräfte, Rollen (add and handover), Atemschutz, CO-Messprotokoll and the operator prompt (Gerät and PIN only appear in the join flow).
  • Not marked: range rules (Timer, Stärke, AGT) and the Einsatzdaten dialog, which stays all-optional on purpose. A test guards the dialog.
  • Accessibility: inputs inside a required field set AutomationProperties.IsRequiredForForm, so a screen reader announces what the asterisk only shows.

One trap worth knowing: a Foreground set on the template part loses to the TextBlock.overline style, because template values rank below styles. The asterisk rendered in caption grey. The colour therefore sits in the .required style rule, and a test pins it.

Screenshots

Task dialog, before / after:

Before
After

Join prompt, before / after:

Before
After

Kräfte dock, before / after:

Before
After

Verification

  • RequiredFieldMarkerTests: 6 headless tests. They were written first and failed 5/5 before the change.
  • make clean ci: green. 0 warnings, 0 errors, no Test Run Failed.

🤖 Generated with Claude Code

A required field looked like every optional one until the press that
failed on it (#412). The shared "field" template now carries a
RequiredMarker part that the "required" class switches on: an asterisk
in ErrorBrush after the caption. Shape and colour together, because a
colour-only signal is lost to glare in the ELW.

Every field backed by a Required *Error opts in -- 19 wrappers across
ETB, Aufgaben, Beteiligte, Kräfte, Rollen, Atemschutz, CO-Messprotokoll
and the operator prompt. Range rules (Timer, Stärke, AGT) and the
Einsatzdaten dialog stay unmarked; a test guards the latter.

The inputs inside a required field also set
AutomationProperties.IsRequiredForForm, so screen readers announce what
the asterisk only shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 merged commit 1abc35f into main Sep 27, 2026
6 checks passed
@DeepDiver1975
DeepDiver1975 deleted the feat/414-pflichtfelder branch September 27, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ux): Pflichtfelder kennzeichnen (Sternchen oder Farbe)

1 participant