Fix feed inputs accessibility
This commit is contained in:
parent
cdd874683f
commit
e1935acdbf
|
@ -69,7 +69,7 @@
|
||||||
<label i18n for="password">Password</label>
|
<label i18n for="password">Password</label>
|
||||||
|
|
||||||
<my-input-text
|
<my-input-text
|
||||||
formControlName= "password" inputId="password" i18n-placeholder placeholder="Password"
|
formControlName="password" inputId="password" i18n-placeholder placeholder="Password"
|
||||||
[formError]="formErrors['password']" autocomplete="current-password" [tabindex]="2"
|
[formError]="formErrors['password']" autocomplete="current-password" [tabindex]="2"
|
||||||
></my-input-text>
|
></my-input-text>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label i18n for="feed-url">Feed URL</label>
|
<label i18n for="feed-url">Feed URL</label>
|
||||||
<my-input-text [value]="feedUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text>
|
<my-input-text inputId="feed-url" [value]="feedUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label i18n for="feed-token">Feed Token</label>
|
<label i18n for="feed-token">Feed Token</label>
|
||||||
<my-input-text [value]="feedToken" [withCopy]="true" [readonly]="true"></my-input-text>
|
<my-input-text inputId="feed-token" [value]="feedToken" [withCopy]="true" [readonly]="true"></my-input-text>
|
||||||
|
|
||||||
<div class="form-group-description" i18n>⚠️ Never share your feed token with anyone.</div>
|
<div class="form-group-description" i18n>⚠️ Never share your feed token with anyone.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input
|
<input
|
||||||
[id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex"
|
[id]="inputId" [name]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex"
|
||||||
[(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly"
|
[(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly"
|
||||||
#input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control"
|
#input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control"
|
||||||
[ngClass]="{ 'input-error': formError }"
|
[ngClass]="{ 'input-error': formError }"
|
||||||
|
|
|
@ -22,7 +22,8 @@ import { NgClass, NgIf } from '@angular/common'
|
||||||
export class InputTextComponent implements ControlValueAccessor, AfterViewInit {
|
export class InputTextComponent implements ControlValueAccessor, AfterViewInit {
|
||||||
@ViewChild('input') inputElement: ElementRef
|
@ViewChild('input') inputElement: ElementRef
|
||||||
|
|
||||||
@Input() inputId = Math.random().toString(11).slice(2, 8) // id cannot be left empty or undefined
|
@Input({ required: true }) inputId: string
|
||||||
|
|
||||||
@Input() value = ''
|
@Input() value = ''
|
||||||
@Input() autocomplete = 'off'
|
@Input() autocomplete = 'off'
|
||||||
@Input() placeholder = ''
|
@Input() placeholder = ''
|
||||||
|
|
Loading…
Reference in New Issue