Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix table expand button accessibility

Chocobozzzbc80e45a09e6
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
index 4af42360cf..cc7b22a68d 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
@@ -36,8 +36,8 @@
<ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
<tr>
- <td class="expand-cell" [pRowToggler]="redundancy">
- <my-table-expander-icon i18n-ngbTooltip ngbTooltip="List redundancies" [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="redundancy" [expanded]="expanded" i18n-tooltip tooltip="List redundancies"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.html b/client/src/app/+admin/moderation/registration-list/registration-list.component.html
index 7bca6341e6..fe3cf63a63 100644
--- a/client/src/app/+admin/moderation/registration-list/registration-list.component.html
+++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.html
@@ -53,8 +53,8 @@
<p-tableCheckbox [value]="registration" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
</td>
- <td class="expand-cell" [pRowToggler]="registration">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="registration" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html
index 9b7d3c95a0..895daa7f6a 100644
--- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html
+++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html
@@ -38,8 +38,9 @@
<td *ngIf="!videoBlock.reason">
<span i18n class="visually-hidden">No more information is available for this row</span>
</td>
- <td class="expand-cell" *ngIf="videoBlock.reason" [pRowToggler]="videoBlock">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+
+ <td class="expand-cell" *ngIf="videoBlock.reason" >
+ <my-table-expander-icon [pRowToggler]="videoBlock" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.html b/client/src/app/+admin/overview/comments/video-comment-list.component.html
index f53f161d22..ced4b58a72 100644
--- a/client/src/app/+admin/overview/comments/video-comment-list.component.html
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.html
@@ -57,8 +57,8 @@
<p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
</td>
- <td class="expand-cell" [pRowToggler]="videoComment">
- <my-table-expander-icon i18n-ngbTooltip ngbTooltip="See full comment" [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="videoComment" i18n-tooltip tooltip="See full comment" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.html b/client/src/app/+admin/overview/users/user-list/user-list.component.html
index ba0265ab72..48cd15d528 100644
--- a/client/src/app/+admin/overview/users/user-list/user-list.component.html
+++ b/client/src/app/+admin/overview/users/user-list/user-list.component.html
@@ -79,8 +79,8 @@
<p-tableCheckbox [value]="user" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
</td>
- <td class="expand-cell" [ngClass]="{ 'empty-cell': !user.blockedReason }" [pRowToggler]="user">
- <my-table-expander-icon *ngIf="user.blockedReason" [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell" [ngClass]="{ 'empty-cell': !user.blockedReason }">
+ <my-table-expander-icon *ngIf="user.blockedReason" [pRowToggler]="user" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html
index 8dc0fa04c4..dfd48b6b41 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.html
+++ b/client/src/app/+admin/overview/videos/video-list.component.html
@@ -54,8 +54,8 @@
<p-tableCheckbox [value]="video" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
</td>
- <td class="expand-cell" [pRowToggler]="video">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="video" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html
index fae49538b7..2b9a4d7b64 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.html
+++ b/client/src/app/+admin/system/jobs/jobs.component.html
@@ -53,8 +53,8 @@
<ng-template pTemplate="body" let-expanded="expanded" let-job>
<tr>
- <td class="expand-cell" [pRowToggler]="job">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="job" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="job-id c-hand" [pRowToggler]="job" [title]="job.id">{{ job.id }}</td>
diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.html b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.html
index 5edec4c204..a940d8a6b0 100644
--- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.html
+++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.html
@@ -63,8 +63,8 @@
<p-tableCheckbox [value]="runnerJob" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
</td>
- <td class="expand-cell" [pRowToggler]="runnerJob">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="runnerJob" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
index 4789926c04..cf5c4b4757 100644
--- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
+++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
@@ -35,8 +35,8 @@
<ng-template pTemplate="body" let-expanded="expanded" let-videoImport>
<tr>
- <td class="expand-cell" [pRowToggler]="videoImport">
- <my-table-expander-icon *ngIf="videoImport.error" [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon *ngIf="videoImport.error" [pRowToggler]="videoImport" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html
index d525b9f868..f7a0ded0d6 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html
+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html
@@ -31,8 +31,8 @@
<ng-template pTemplate="body" let-expanded="expanded" let-abuse>
<tr>
- <td class="expand-cell" [pRowToggler]="abuse">
- <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
+ <td class="expand-cell">
+ <my-table-expander-icon [pRowToggler]="abuse" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
diff --git a/client/src/app/shared/shared-tables/table-expander-icon.component.ts b/client/src/app/shared/shared-tables/table-expander-icon.component.ts
index 66bbfe6fbd..9c3983be1e 100644
--- a/client/src/app/shared/shared-tables/table-expander-icon.component.ts
+++ b/client/src/app/shared/shared-tables/table-expander-icon.component.ts
@@ -3,10 +3,11 @@ import { Component, Input } from '@angular/core'
@Component({
selector: 'my-table-expander-icon',
template: `
-<span class="expander">
- <i [ngClass]="expanded ? 'chevron-down' : 'chevron-right'"></i>
-</span>`
+<button class="expander border-0 p-0" [ngbTooltip]="tooltip">
+ <i [ngClass]="expanded ? 'chevron-down' : 'chevron-right'"></i>
+</button>`
})
export class TableExpanderIconComponent {
@Input() expanded: boolean
+ @Input() tooltip = $localize`Get more information`
}