mirror of https://github.com/Chocobozzz/PeerTube
Fix table expand button accessibility
parent
0d0b5ac08d
commit
bc80e45a09
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue