chore(ui): clear eslint interaction accessibility bucket
Add keyboard handlers and focus support to clickable UI affordances across reader dialogs, metadata views, cards, and layout controls. Keep the existing click behavior intact while making non-button elements operable from the keyboard and clearing the remaining template interaction accessibility backlog. Validation: just ui lint
This commit is contained in:
+12
-2
@@ -33,7 +33,12 @@
|
||||
[placeholder]="t('searchPlaceholder')"
|
||||
/>
|
||||
@if (searchQuery) {
|
||||
<i class="pi pi-times clear-icon" (click)="searchQuery = ''; onSearch()"></i>
|
||||
<i
|
||||
class="pi pi-times clear-icon"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="searchQuery = ''; onSearch()"
|
||||
(keydown.enter)="searchQuery = ''; onSearch()"></i>
|
||||
}
|
||||
</p-iconfield>
|
||||
<p-button
|
||||
@@ -143,7 +148,12 @@
|
||||
(click)="$event.stopPropagation()"
|
||||
/>
|
||||
</div>
|
||||
<label [for]="'folder-' + folder" class="directory-label" (click)="onRowClick(folder)">
|
||||
<label
|
||||
[for]="'folder-' + folder"
|
||||
class="directory-label"
|
||||
tabindex="0"
|
||||
(click)="onRowClick(folder)"
|
||||
(keydown.enter)="onRowClick(folder)">
|
||||
<div class="directory-icon-wrapper">
|
||||
<i class="pi pi-folder directory-icon"></i>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,9 @@ export type DocType = 'kobo' | 'opds' | 'metadataManager' | 'koReader' | 'email'
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[style.font-size]="size"
|
||||
(click)="openLink()"
|
||||
(keydown.enter)="openLink()"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
`,
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
@for (icon of filteredIcons(); track icon) {
|
||||
<div
|
||||
class="icon-item"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="selectIcon(icon)"
|
||||
(keydown.enter)="selectIcon(icon)"
|
||||
[class.selected]="icon === selectedIcon"
|
||||
[title]="icon"
|
||||
>
|
||||
@@ -96,7 +99,10 @@
|
||||
@for (iconName of filteredSvgIcons(); track iconName) {
|
||||
<div
|
||||
class="icon-item svg-icon-item"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="selectSvgIcon(iconName)"
|
||||
(keydown.enter)="selectSvgIcon(iconName)"
|
||||
[class.selected]="iconName === selectedSvgIcon"
|
||||
[title]="iconName"
|
||||
draggable="true"
|
||||
|
||||
Reference in New Issue
Block a user