Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent some linter warnings and make OS4 more accessiblle #3103

Merged
merged 26 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
08177d5
start to make focusable and enter events
Elblinator Dec 14, 2023
39bd286
end of the day commit
Elblinator Dec 15, 2023
122a48d
make grid in metting-setting list tabable
Elblinator Dec 20, 2023
1d94519
clean-up
Elblinator Dec 20, 2023
3c08e3a
prettify
Elblinator Dec 20, 2023
ad61974
revert changes to motion-detail view
Elblinator Dec 21, 2023
3c8d231
revert unnecessary changes
Elblinator Dec 21, 2023
0c0ba80
clean-up
Elblinator Dec 21, 2023
a779308
make "exit" from history-Mode focusable
Elblinator Dec 21, 2023
b768b1d
certain elements should not be focusable
Elblinator Dec 21, 2023
fe2e536
file-list
Elblinator Dec 22, 2023
2137079
expandable content
Elblinator Jan 9, 2024
eade4e5
Revert "make "exit" from history-Mode focusable"
Elblinator Jan 12, 2024
e3bc905
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Feb 15, 2024
bb7cb76
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Feb 15, 2024
9ecc5ff
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Feb 15, 2024
4c1a3e0
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Feb 19, 2024
ca854bf
make edit dialog focusable
Elblinator Feb 19, 2024
1b17712
clean-up
Elblinator Feb 19, 2024
91ab86b
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Feb 22, 2024
84f84c9
meta
Elblinator Feb 22, 2024
ec8c852
change icon for organisation level
Elblinator Feb 22, 2024
da375fb
var name change
Elblinator Mar 11, 2024
83e1e5d
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Mar 11, 2024
968d928
Merge remote-tracking branch 'upstream/main' into 3079-linter-accessi…
Elblinator Mar 15, 2024
c9b0af9
clean-up
Elblinator Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2 mat-dialog-title class="flex-container padding-top-16">
</div>
<mat-divider [vertical]="true"></mat-divider>
<div class="account-dialog-content">
<div class="content-wrapper" (keydown)="onKeyDown($event)">
<div class="content-wrapper" (keydown)="onKeyDown($event)" tabindex="-1">
<ng-container [ngSwitch]="activeMenuItem">
<ng-container
*ngSwitchCase="menuItemsRef.SHOW_PROFILE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h3>{{ 'Candidates' | translate }}</h3>
<!-- Form -->
<ng-template #assignmentFormTemplate>
<mat-card class="os-form-card spacer-bottom-60">
<form class="content" [formGroup]="assignmentForm" (keydown)="onKeyDown($event)">
<form class="content" [formGroup]="assignmentForm" (keydown)="onKeyDown($event)" tabindex="-1">
<div>
<!-- title -->
<mat-form-field class="full-width">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h2>{{ 'Files' | translate }}</h2>
<os-file-list
[currentDirectory]="directory"
[isMultiSelect]="isMultiSelect"
[hiddenInMobile]="['info']"
[hiddenInMobile]="['edit']"
[canEdit]="canEdit"
[canAccessFileMenu]="canAccessFileMenu"
[sourceFiles]="directoryObservable"
Expand All @@ -49,19 +49,7 @@ <h2>{{ 'Files' | translate }}</h2>
(saved)="onSaveFile($event.update)"
(deleted)="onDeleteFile($event.file)"
(selected)="onSelect($event.files)"
>
<div
*osScrollingTableCell="'info'; row as mediafile; config: { width: 200 }"
class="fill clickable"
(click)="triggerEdit(mediafile)"
>
<os-icon-container *ngIf="mediafile.access_groups.length" icon="group">
<os-comma-separated-listing [list]="mediafile.access_groups" [showElementsAmount]="3">
<ng-template let-group>{{ $any(group).getTitle() }}</ng-template>
</os-comma-separated-listing>
</os-icon-container>
</div>
</os-file-list>
></os-file-list>

<!-- Visibility as button -->
<ng-template #breadcrumbManageTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ <h2>{{ 'Settings' | translate }}</h2>
[osPaper]="2"
[osPaperRaise]="true"
[routerLink]="group.label.toLowerCase()"
(keydown.enter)="onEnter(group.label)"
tabindex="0"
>
<div class="flex-center background-selected">
<mat-icon>{{ group.icon }}</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,9 @@ export class MeetingSettingsGroupListComponent extends BaseMeetingComponent {
}
return payload;
}

protected onEnter(route: string): void {
route = this.activeMeetingId + `/settings/` + route.toLowerCase();
this.router.navigate([route]);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<os-action-card [showActionRow]="true" icon="speaker_notes" [disableExpandControl]="true">
<os-action-card [showActionRow]="true" icon="speaker_notes" [disableExpandControl]="isEditing">
<!-- Title row -->
<ng-container class="meta-text-block-title">
<span>{{ 'Personal note' | translate }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h2>{{ 'Files' | translate }}</h2>
(saved)="onSaveFile($event.update)"
(deleted)="onDeleteFile($event.file)"
(selected)="onSelect($event.files)"
[isInMeeting]="false"
></os-file-list>

<!-- Menu for Mediafiles -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<!-- Expanding control -->
<div class="small show-entire-text" *ngIf="canExpand && !disableExpandControl">
<a (click)="toggleExpansion()">
<a (click)="toggleExpansion()" tabindex="0" (keydown.enter)="toggleExpansion()">
{{ isExpanded ? ('Hide more text' | translate) : ('Show full text' | translate) }}
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@
cursor: pointer;
}
}

.show-entire-text {
a:focus {
outline: none;
text-decoration: underline;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
></a>
<a
class="detail-link"
(click)="changeDirectory(mediafile.id)"
*ngIf="mediafile.is_directory && !isMultiSelect"
(click)="changeDirectory(mediafile.id)"
(keydown.enter)="changeDirectory(mediafile.id)"
tabindex="0"
></a>
<mat-icon class="grey-icon foreground-icon">{{ mediafile.getIcon() }}</mat-icon>
</div>
Expand All @@ -86,8 +88,10 @@
></a>
<a
class="detail-link"
(click)="changeDirectory(mediafile.id)"
*ngIf="mediafile.is_directory && !isMultiSelect"
(click)="changeDirectory(mediafile.id)"
(keydown.enter)="changeDirectory(mediafile.id)"
tabindex="0"
></a>
<div class="innerTable overflow-hidden">
<div class="file-title ellipsis-overflow">
Expand All @@ -99,6 +103,27 @@
</div>
</div>

<div *osScrollingTableCell="'edit'; row as mediafile" class="fill detail-link">
<div
*ngIf="canEdit"
class="fill detail-link"
tabindex="0"
(click)="onEditFile(mediafile, fileEditDialog)"
(keydown.enter)="onEditFile(mediafile, fileEditDialog)"
>
<ng-container *ngIf="isInMeeting">
<os-icon-container icon="group">
<os-comma-separated-listing [list]="mediafile.access_groups" [showElementsAmount]="3">
<ng-template let-group>{{ $any(group).getTitle() }}</ng-template>
</os-comma-separated-listing>
</os-icon-container>
</ng-container>
<ng-container *ngIf="!isInMeeting">
<os-icon-container icon="edit"></os-icon-container>
</ng-container>
</div>
</div>

<!-- Mimetype (usually hidden) -->
<div *osScrollingTableCell="'mimetype'; row as mediafile; isHidden: true" class="fill clickable">
{{ mediafile.mimetype }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ $navbar-size: 40px;
margin-bottom: 60px !important;
}
}

.detail-link:focus {
outline: none;
border: 0px solid;
background-color: rgba(0, 0, 0, 0.087);
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export class FileListComponent extends BaseUiComponent implements OnInit, OnDest
this._hiddenInMobile = [`indicator`, ...cols];
}

@Input()
public isInMeeting = true;

@Input()
public addBottomSpacer = false;

Expand Down
4 changes: 3 additions & 1 deletion client/src/app/ui/modules/file-list/file-list.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-m
import { MatTooltipModule } from '@angular/material/tooltip';
import { RouterModule } from '@angular/router';
import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations';
import { CommaSeparatedListingModule } from 'src/app/ui/modules/comma-separated-listing';
import { IconContainerModule } from 'src/app/ui/modules/icon-container/icon-container.module';
import { ListModule } from 'src/app/ui/modules/list';
import { SearchSelectorModule } from 'src/app/ui/modules/search-selector';
Expand All @@ -35,7 +36,8 @@ const DECLARATIONS = [FileListComponent];
SearchSelectorModule,
IconContainerModule,
PipesModule,
OpenSlidesTranslationModule.forChild()
OpenSlidesTranslationModule.forChild(),
CommaSeparatedListingModule
]
})
export class FileListModule {}
2 changes: 1 addition & 1 deletion client/src/app/ui/modules/grid/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
export interface GridTileClickEvent<T = object> {
data: T | null;
source: MouseEvent;
source: MouseEvent | Event;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/ui/modules/grid/grid/grid.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h3>{{ title }}</h3>
</div>

<div class="os-grid" [ngClass]="{ 'no-space': noSpace }">
<div *ngFor="let tile of tiles" [ngClass]="tile.classes" (click)="tile.onClick($event)">
<div *ngFor="let tile of tiles" [ngClass]="tile.classes" (click)="tile.onClick($event)" tabindex="-1">
<div class="tile-placeholder" [ngStyle]="{ marginTop: rowHeight }"></div>
<div class="tile-content stretch-to-fill-parent">
<ng-container *ngTemplateOutlet="tile.implicitContent; context: { $implicit: tile.data }"></ng-container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<span (click)="launchC4($event)">©</span>
<span (click)="launchC4($event)" (keydown.enter)="launchC4($event)" tabindex="0">©</span>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ <h2 mat-dialog-title class="left-align no-margin">{{ caption | translate }}</h2>
<table [class]="disableBoard ? 'disabled' : ''" id="c4">
<tr *ngFor="let row of [5, 4, 3, 2, 1, 0]">
<td *ngFor="let col of [0, 1, 2, 3, 4, 5, 6]">
<div [class]="getCoinClass(row, col)" (click)="clickField(col)"></div>
<div
[class]="getCoinClass(row, col)"
(click)="clickField(col)"
(keydown.enter)="clickField(col)"
tabindex="0"
></div>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
[ngClass]="{ 'background-primary': index === selectedTabLabelIndex }"
[ngStyle]="{ height: labelHeight }"
(click)="changeTabSelection(index); openContent()"
(keydown.enter)="changeTabSelection(index); openContent()"
tabindex="0"
>
<ng-template [cdkPortalOutlet]="tabLabel"></ng-template>
<mat-icon *ngIf="isMobile" class="margin-right-8">arrow_forward_ios</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
.vertical-tab-label {
position: relative;
}

.vertical-tab-label:hover {
background-color: rgba(0, 0, 0, 0.025);
}
}
}
Loading