chore(ui): clear eslint label-association bucket
- Frontend accessibility cleanup: - add concrete `for` and `id` or `inputId` bindings where labels map to real inputs, selects, and number fields - convert remaining row headers and grouped-control captions from `<label>` to `<span>` where the markup described composite controls rather than a single form element - Lint progress: - clear the remaining `@angular-eslint/template/label-has-associated-control` backlog from 109 issues to 0 - reduce total frontend lint errors from 532 to 423 while keeping the next accessibility buckets isolated - Validation: - `just ui lint`
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
</div>
|
||||
@if (isMobile) {
|
||||
<div class="display-settings-section">
|
||||
<label class="display-settings-label">{{ t('labels.gridColumns') }}</label>
|
||||
<span class="display-settings-label">{{ t('labels.gridColumns') }}</span>
|
||||
<div class="column-options">
|
||||
<button
|
||||
type="button"
|
||||
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
} @else {
|
||||
<div class="display-settings-section">
|
||||
<label class="display-settings-label">{{ t('labels.gridItemSize') }}</label>
|
||||
<span class="display-settings-label">{{ t('labels.gridItemSize') }}</span>
|
||||
<p-slider
|
||||
[ngModel]="coverScalePreferenceService.scaleFactor()"
|
||||
(ngModelChange)="coverScalePreferenceService.setScale($event)"
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
<div class="fields-grid">
|
||||
@for (field of lockableFields; track field) {
|
||||
<div class="field-row">
|
||||
<label class="field-label">{{ fieldLabels[field] || field }}</label>
|
||||
<span class="field-label">{{ fieldLabels[field] || field }}</span>
|
||||
<p-button
|
||||
[outlined]="true"
|
||||
[label]="getLockLabel(field)"
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
<div class="dialog-content">
|
||||
<div class="form-fields">
|
||||
<div class="form-field">
|
||||
<label class="field-label">{{ t('emailProvider') }}</label>
|
||||
<label class="field-label" for="book-sender-provider">{{ t('emailProvider') }}</label>
|
||||
<p-select
|
||||
inputId="book-sender-provider"
|
||||
[options]="emailProviders"
|
||||
optionLabel="label"
|
||||
[placeholder]="t('selectProvider')"
|
||||
@@ -33,8 +34,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label class="field-label">{{ t('recipient') }}</label>
|
||||
<label class="field-label" for="book-sender-recipient">{{ t('recipient') }}</label>
|
||||
<p-select
|
||||
inputId="book-sender-recipient"
|
||||
[options]="emailRecipients"
|
||||
optionLabel="label"
|
||||
[placeholder]="t('selectRecipient')"
|
||||
@@ -47,7 +49,7 @@
|
||||
|
||||
@if (emailableFiles.length > 0) {
|
||||
<div class="form-field">
|
||||
<label class="field-label">{{ t('fileFormat') }}</label>
|
||||
<span class="field-label">{{ t('fileFormat') }}</span>
|
||||
<div class="format-options">
|
||||
@for (file of emailableFiles; track file.id) {
|
||||
<div class="format-option" [class.selected]="selectedFileId === file.id">
|
||||
|
||||
+4
-4
@@ -46,10 +46,10 @@
|
||||
<div class="gradient-divider"></div>
|
||||
|
||||
<div class="form-group highlight-group">
|
||||
<label class="form-label">
|
||||
<span class="form-label">
|
||||
<i class="pi pi-palette label-icon"></i>
|
||||
{{ t('shelfIconLabel') }}
|
||||
</label>
|
||||
</span>
|
||||
@if (!selectedIcon) {
|
||||
<button class="icon-select-btn" (click)="openIconPicker()" type="button">
|
||||
<i class="pi pi-plus"></i>
|
||||
@@ -94,10 +94,10 @@
|
||||
<div class="gradient-divider"></div>
|
||||
|
||||
<div class="form-group highlight-group">
|
||||
<label class="form-label">
|
||||
<span class="form-label">
|
||||
<i class="pi pi-globe label-icon"></i>
|
||||
{{ t('visibilityLabel') }}
|
||||
</label>
|
||||
</span>
|
||||
<div class="input-wrapper" style="display: flex; align-items: center; gap: 0.5rem;">
|
||||
<p-checkbox [(ngModel)]="isPublic" [binary]="true" inputId="publicShelf"></p-checkbox>
|
||||
<label for="publicShelf" style="cursor: pointer">{{ t('makePublicLabel') }}</label>
|
||||
|
||||
+4
-4
@@ -23,12 +23,12 @@
|
||||
<div class="shelf-container">
|
||||
<div class="shelf-fields">
|
||||
<div class="shelf-row">
|
||||
<label class="label">{{ t('shelfNameLabel') }}</label>
|
||||
<input type="text" pInputText [(ngModel)]="shelfName" [placeholder]="t('shelfNamePlaceholder')" class="input"/>
|
||||
<label class="label" for="shelf-edit-name">{{ t('shelfNameLabel') }}</label>
|
||||
<input id="shelf-edit-name" type="text" pInputText [(ngModel)]="shelfName" [placeholder]="t('shelfNamePlaceholder')" class="input"/>
|
||||
</div>
|
||||
|
||||
<div class="shelf-row">
|
||||
<label class="label">{{ t('shelfIconLabel') }}</label>
|
||||
<span class="label">{{ t('shelfIconLabel') }}</span>
|
||||
<div class="icon-section">
|
||||
@if (!selectedIcon) {
|
||||
<p-button [label]="t('selectIcon')" icon="pi pi-search" [outlined]="true" severity="info" (onClick)="openIconPicker()"></p-button>
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
@if (isAdmin) {
|
||||
<div class="shelf-row">
|
||||
<label class="label">{{ t('visibilityLabel') }}</label>
|
||||
<span class="label">{{ t('visibilityLabel') }}</span>
|
||||
<div class="visibility-section" style="display: flex; align-items: center; gap: 0.5rem;">
|
||||
<p-checkbox [(ngModel)]="isPublic" [binary]="true" inputId="publicShelf"></p-checkbox>
|
||||
<label for="publicShelf" style="cursor: pointer; user-select: none;">{{ t('publicShelfLabel') }}</label>
|
||||
|
||||
Reference in New Issue
Block a user