Checkbox/Radio: Pattern-Label immer als eigene Zeile über Controls

This commit is contained in:
2026-05-23 10:31:30 +02:00
parent bc52b755d2
commit e4a2872b17
2 changed files with 28 additions and 25 deletions
+4 -8
View File
@@ -399,7 +399,8 @@
<span>Standard Checkbox</span> <span>Standard Checkbox</span>
</label> </label>
<div class="sg-activatable-row"> <div class="sg-checkbox-field-option sg-checkbox-field-option--inactive-selectable sg-body" id="component-checkbox-activatable" data-component="checkbox-field" data-component-state="inactive-selectable" data-activatable="true">
<span class="sg-state-example__label sg-table-label">Variante aktivierbar</span>
<button class="sg-mode-toggle sg-mode-toggle--local sg-activation-mode-toggle" type="button" data-active="absolute" aria-label="Aktivierung: aus" data-activation-target="component-checkbox-activatable"> <button class="sg-mode-toggle sg-mode-toggle--local sg-activation-mode-toggle" type="button" data-active="absolute" aria-label="Aktivierung: aus" data-activation-target="component-checkbox-activatable">
<span class="sg-mode-toggle__switch" aria-hidden="true" data-component-part="toggle-track"> <span class="sg-mode-toggle__switch" aria-hidden="true" data-component-part="toggle-track">
<span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--left">aus</span> <span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--left">aus</span>
@@ -407,13 +408,10 @@
<span class="sg-mode-toggle__handle" data-component-part="toggle-handle"></span> <span class="sg-mode-toggle__handle" data-component-part="toggle-handle"></span>
</span> </span>
</button> </button>
<label class="sg-checkbox-field-option sg-checkbox-field-option--inactive-selectable sg-body" id="component-checkbox-activatable" data-component="checkbox-field" data-component-state="inactive-selectable" data-activatable="true">
<span class="sg-state-example__label sg-table-label">Variante aktivierbar</span>
<button class="sg-checkbox-field sg-checkbox-field--inactive-selectable" type="button" role="checkbox" aria-checked="false" aria-label="Option wählen"> <button class="sg-checkbox-field sg-checkbox-field--inactive-selectable" type="button" role="checkbox" aria-checked="false" aria-label="Option wählen">
<span class="sg-checkbox-field__mark" aria-hidden="true"></span> <span class="sg-checkbox-field__mark" aria-hidden="true"></span>
</button> </button>
<span>Option wählbar</span> <span>Option wählbar</span>
</label>
</div> </div>
<label class="sg-checkbox-field-option sg-checkbox-field-option--disabled sg-body" data-component="checkbox-field" data-component-state="disabled"> <label class="sg-checkbox-field-option sg-checkbox-field-option--disabled sg-body" data-component="checkbox-field" data-component-state="disabled">
@@ -447,7 +445,8 @@
<span>Standard Radio</span> <span>Standard Radio</span>
</label> </label>
<div class="sg-activatable-row"> <div class="sg-checkbox-field-option sg-checkbox-field-option--inactive-selectable sg-body sg-radio-activatable-group" id="component-radio-activatable" data-component="radio-field" data-component-state="inactive-selectable" data-activatable="true" data-activatable-radio-group="true">
<span class="sg-state-example__label sg-table-label">Variante aktivierbar</span>
<button class="sg-mode-toggle sg-mode-toggle--local sg-activation-mode-toggle" type="button" data-active="absolute" aria-label="Aktivierung: aus" data-activation-target="component-radio-activatable"> <button class="sg-mode-toggle sg-mode-toggle--local sg-activation-mode-toggle" type="button" data-active="absolute" aria-label="Aktivierung: aus" data-activation-target="component-radio-activatable">
<span class="sg-mode-toggle__switch" aria-hidden="true" data-component-part="toggle-track"> <span class="sg-mode-toggle__switch" aria-hidden="true" data-component-part="toggle-track">
<span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--left">aus</span> <span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--left">aus</span>
@@ -455,8 +454,6 @@
<span class="sg-mode-toggle__handle" data-component-part="toggle-handle"></span> <span class="sg-mode-toggle__handle" data-component-part="toggle-handle"></span>
</span> </span>
</button> </button>
<label class="sg-checkbox-field-option sg-checkbox-field-option--inactive-selectable sg-body sg-radio-activatable-group" id="component-radio-activatable" data-component="radio-field" data-component-state="inactive-selectable" data-activatable="true" data-activatable-radio-group="true">
<span class="sg-state-example__label sg-table-label">Variante aktivierbar</span>
<span class="sg-radio-activatable-group__choices"> <span class="sg-radio-activatable-group__choices">
<span class="sg-radio-activatable-group__choice"> <span class="sg-radio-activatable-group__choice">
<button class="sg-radio-field sg-radio-field--inactive-selectable" type="button" role="radio" aria-checked="false" aria-label="Option 1 wählen"> <button class="sg-radio-field sg-radio-field--inactive-selectable" type="button" role="radio" aria-checked="false" aria-label="Option 1 wählen">
@@ -471,7 +468,6 @@
<span>Option 2</span> <span>Option 2</span>
</span> </span>
</span> </span>
</label>
</div> </div>
<label class="sg-checkbox-field-option sg-checkbox-field-option--disabled sg-body" data-component="radio-field" data-component-state="disabled"> <label class="sg-checkbox-field-option sg-checkbox-field-option--disabled sg-body" data-component="radio-field" data-component-state="disabled">
+7
View File
@@ -1539,6 +1539,13 @@ section + section {
align-items: center; align-items: center;
gap: var(--spacing-small); gap: var(--spacing-small);
color: var(--text-control-default); color: var(--text-control-default);
flex-wrap: wrap;
}
#component-checkbox-field .sg-checkbox-field-option .sg-state-example__label,
#component-radio-field .sg-checkbox-field-option .sg-state-example__label {
flex: 0 0 100%;
margin-bottom: var(--spacing-small);
} }
.sg-checkbox-field-option--inactive-selectable { .sg-checkbox-field-option--inactive-selectable {