diff --git a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.html b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.html index da3b6072530f0402bea3dadf7dac41f97712d9ed..02cf64660bd972c3b2a2b19a7cf30b04c58194c7 100644 --- a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.html +++ b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.html @@ -24,7 +24,11 @@ --> <form class="form" [formGroup]="formService.form"> - <ozgcloud-textarea-editor [formControlName]="formServiceClass.TEXT" label="Kommentar"> + <ozgcloud-textarea-editor + [formControlName]="formServiceClass.TEXT" + label="Kommentar" + [required]="true" + > </ozgcloud-textarea-editor> <alfa-binary-file-attachment-container diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.html b/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.html index c56d5eeb8514ed4295ffba4817c573e304009ffb..cea292daf1e3bfe942599923ec2cba8083a7c3ce 100644 --- a/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.html +++ b/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.html @@ -33,12 +33,15 @@ [formControlName]="formServiceClass.FIELD_SUBJECT" label="Betreff" [autoFocus]="true" + [required]="true" > </ozgcloud-text-editor> <ozgcloud-textarea-editor [formControlName]="formServiceClass.FIELD_MAIL_BODY" label="Text" - class="message-editor" + class="message-editor mt-3" + [autoFocus]="true" + [required]="true" > </ozgcloud-textarea-editor> diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.scss b/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.scss index d72717d84ac61991ea6146183c7800a5ed773fae..5b22d572e2a37eb567ba59013f2fc06473826ff6 100644 --- a/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.scss +++ b/alfa-client/libs/postfach/src/lib/postfach-mail-form/postfach-mail-form.component.scss @@ -38,15 +38,8 @@ } .message-editor { - margin-top: -30px; + margin-top: -20px; display: block; - - ::ng-deep { - label, - .mat-lable { - visibility: hidden; - } - } } .receiver { diff --git a/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.html b/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.html index dd35f14177f9f6b6de7b665da4c71f0ec6bb5581..a30e6e9b74bd05e87717209451e50df64f03a398 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.html +++ b/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.html @@ -24,12 +24,19 @@ --> <mat-form-field> - <mat-label>{{ label }}</mat-label> + <mat-label + >{{ label + }}<ng-container *ngIf="required"> + <i aria-hidden="true">*</i> + <i class="sr-only">(erforderlich)</i> + </ng-container> + </mat-label> <input matInput [matDatepicker]="picker" [formControl]="fieldControl" (blur)="touch()" + [attr.aria-required]="required" [attr.data-test-id]="(label | convertForDataTest) + '-date-input'" (dateInput)="inputEvent($event)" (blur)="onBlur()" diff --git a/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.ts b/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.ts index b93828d71bece9019d6ce554f0e93709114b4bc6..27619ab5f03eb534053f871ae817dcacd07f5fe3 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.ts +++ b/alfa-client/libs/ui/src/lib/ui/editor/date-editor/date-editor.component.ts @@ -34,6 +34,7 @@ import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstra }) export class DateEditorComponent extends FormControlEditorAbstractComponent { @Input() label: string; + @Input() required: boolean = false; inputEvent(event: MatDatepickerInputEvent<Date>): void { this.onChange(event.value); diff --git a/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.html b/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.html index 9087fe250f23f35de30bf35cd57e9dcdc014bc57..6d1b98c41365ae223a6f7bac4f3fbcde85650bcc 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.html +++ b/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.html @@ -29,7 +29,13 @@ appearance="{{ appearance }}" [floatLabel]="readOnly || autoFocus ? 'always' : 'auto'" > - <mat-label>{{ label }}</mat-label> + <mat-label + >{{ label + }}<ng-container *ngIf="required"> + <i aria-hidden="true">*</i> + <i class="sr-only">(erforderlich)</i> + </ng-container> + </mat-label> <div class="wrapper"> <input #inputElement @@ -39,6 +45,7 @@ [autocomplete]="autocomplete" [readonly]="readOnly" (blur)="touch()" + [attr.aria-required]="required" [attr.data-test-id]="(label | convertForDataTest) + '-text-input'" [class.with-clear-button]="showClearButton$ | async" /> diff --git a/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.ts b/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.ts index a64326dcbad46ccca353328cf70477fe653e4b29..017dab82a8ba476c585b0af20b9f7c3080e0ff7b 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.ts +++ b/alfa-client/libs/ui/src/lib/ui/editor/text-editor/text-editor.component.ts @@ -21,11 +21,11 @@ * Die sprachspezifischen Genehmigungen und Beschränkungen * unter der Lizenz sind dem Lizenztext zu entnehmen. */ -import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; -import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component'; -import { map, Observable, startWith } from 'rxjs'; import { hasContent } from '@alfa-client/tech-shared'; +import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; import { SubscriptSizing } from '@angular/material/form-field'; +import { Observable, map, startWith } from 'rxjs'; +import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component'; @Component({ selector: 'ozgcloud-text-editor', @@ -45,7 +45,8 @@ export class TextEditorComponent @Input() appearance: 'outline' | 'fill' = 'fill'; @Input() readOnly: boolean; @Input() autoFocus: boolean; - @Input() clearable = false; + @Input() clearable: boolean = false; + @Input() required: boolean = false; @Input() subscriptSizing: SubscriptSizing = 'fixed'; showClearButton$: Observable<boolean>; diff --git a/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.html b/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.html index c40765078be75b0b8a038ffa7896f82dafed9a54..c1ef2c020d86be37f5758d93d338b59b0d69f49e 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.html +++ b/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.html @@ -23,8 +23,14 @@ unter der Lizenz sind dem Lizenztext zu entnehmen. --> -<mat-form-field [appearance]="appearance"> - <mat-label>{{ label }}</mat-label> +<mat-form-field [appearance]="appearance" [floatLabel]="autoFocus ? 'always' : 'auto'"> + <mat-label + >{{ label + }}<ng-container *ngIf="required"> + <i aria-hidden="true">*</i> + <i class="sr-only">(erforderlich)</i> + </ng-container> + </mat-label> <textarea #autosize="cdkTextareaAutosize" @@ -32,6 +38,7 @@ matInput cdkTextareaAutosize [formControl]="fieldControl" + [attr.aria-required]="required" [attr.data-test-id]="(label | convertForDataTest) + '-textarea-input'" (blur)="touch()" ></textarea> diff --git a/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.ts b/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.ts index b5c876ac008f4fa926459a7cefeba05a185b657c..ff008c8ba924f7ff54291ecf8f0130bda01aeea5 100644 --- a/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.ts +++ b/alfa-client/libs/ui/src/lib/ui/editor/textarea-editor/textarea-editor.component.ts @@ -39,6 +39,8 @@ export class TextAreaEditorComponent @Input() placeholder: string; @Input() label: string = ''; @Input() appearance: 'outline' | 'fill' = 'fill'; + @Input() required: boolean = false; + @Input() autoFocus: boolean = false; ngAfterViewInit() { this.autosize.resizeToFitContent(true); diff --git a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-antrag-bescheiden/vorgang-detail-bescheiden-antrag-bescheiden.component.html b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-antrag-bescheiden/vorgang-detail-bescheiden-antrag-bescheiden.component.html index 8b253050b328a8bf63b1c175113678ef8cfd15e7..ad1704f9c19a82c2a3fe30cb866eb98730f4ff69 100644 --- a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-antrag-bescheiden/vorgang-detail-bescheiden-antrag-bescheiden.component.html +++ b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-antrag-bescheiden/vorgang-detail-bescheiden-antrag-bescheiden.component.html @@ -22,6 +22,7 @@ [formControlName]="formServiceClass.FIELD_BESCHIEDEN_AM" label="am" aria-label="Bescheiddatum" + [required]="true" > </ozgcloud-date-editor> </div> diff --git a/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-page-container/wiedervorlage-page/wiedervorlage-form/wiedervorlage-form.component.html b/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-page-container/wiedervorlage-page/wiedervorlage-form/wiedervorlage-form.component.html index c90498fb6fd7f0555c399ffc1403cbca28f01d6c..aa62e66b883fe1b7f226db4b2a03cce01481a198 100644 --- a/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-page-container/wiedervorlage-page/wiedervorlage-form/wiedervorlage-form.component.html +++ b/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-page-container/wiedervorlage-page/wiedervorlage-form/wiedervorlage-form.component.html @@ -24,7 +24,11 @@ --> <form class="form" [formGroup]="formService.form"> - <ozgcloud-text-editor label="Betreff" [formControlName]="formServiceClass.FIELD_BETREFF"> + <ozgcloud-text-editor + label="Betreff" + [formControlName]="formServiceClass.FIELD_BETREFF" + [required]="true" + > </ozgcloud-text-editor> <ozgcloud-textarea-editor @@ -33,7 +37,12 @@ > </ozgcloud-textarea-editor> - <ozgcloud-date-editor class="date" label="Frist" [formControlName]="formServiceClass.FIELD_FRIST"> + <ozgcloud-date-editor + class="date" + label="Frist" + [formControlName]="formServiceClass.FIELD_FRIST" + [required]="true" + > </ozgcloud-date-editor> <alfa-binary-file-attachment-container