Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions resources/i18n/en-US/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
"cancel": "Cancel"
},
"overviewHeader": {
"manageBackends": "Manage Backends",
"backendSwitchAria": "Current mode: {{title}} - Click to switch backend"
"manageBackends": "Manage Backends"
},
"settingControl": {
"default": "Default: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/es-ES/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
"cancel": "Cancelar"
},
"overviewHeader": {
"manageBackends": "Gestionar backends",
"backendSwitchAria": "Modo actual: {{title}} - Haga clic para cambiar el backend"
"manageBackends": "Gestionar backends"
},
"settingControl": {
"default": "Predeterminado: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/fr-FR/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
"cancel": "Annuler"
},
"overviewHeader": {
"manageBackends": "Gérer les Backends",
"backendSwitchAria": "Mode actuel : {{title}} - Cliquer pour changer de backend"
"manageBackends": "Gérer les Backends"
},
"settingControl": {
"default": "Défaut : {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/ja-JP/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,7 @@
"cancel": "キャンセル"
},
"overviewHeader": {
"manageBackends": "バックエンドの管理",
"backendSwitchAria": "現在のモード: {{title}} - クリックしてバックエンドを切り替え"
"manageBackends": "バックエンドの管理"
},
"settingControl": {
"default": "デフォルト: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/pt-BR/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
"cancel": "Cancelar"
},
"overviewHeader": {
"manageBackends": "Gerenciar Backends",
"backendSwitchAria": "Modo atual: {{title}} - Clique para alterar o backend"
"manageBackends": "Gerenciar Backends"
},
"settingControl": {
"default": "Padrão: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/ru-RU/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,7 @@
"cancel": "Отмена"
},
"overviewHeader": {
"manageBackends": "Управление бэкендами",
"backendSwitchAria": "Текущий режим: {{title}} - нажмите, чтобы сменить бэкенд"
"manageBackends": "Управление бэкендами"
},
"settingControl": {
"default": "По умолчанию: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/sk-SK/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,7 @@
"cancel": "Zrušiť"
},
"overviewHeader": {
"manageBackends": "Spravovať backendy",
"backendSwitchAria": "Aktuálny režim: {{title}} – kliknutím prepnete backend"
"manageBackends": "Spravovať backendy"
},
"settingControl": {
"default": "Predvolené: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/tr-TR/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
"cancel": "İptal"
},
"overviewHeader": {
"manageBackends": "Arka Uçları Yönet",
"backendSwitchAria": "Mevcut mod: {{title}} - Arka uç değiştirmek için tıklayın"
"manageBackends": "Arka Uçları Yönet"
},
"settingControl": {
"default": "Varsayılan: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/uk-UA/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,7 @@
"cancel": "Скасувати"
},
"overviewHeader": {
"manageBackends": "Керувати бекендами",
"backendSwitchAria": "Поточний режим: {{title}} - натисніть, щоб перемкнути бекенд"
"manageBackends": "Керувати бекендами"
},
"settingControl": {
"default": "Типово: {{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/zh-CN/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,7 @@
"cancel": "取消"
},
"overviewHeader": {
"manageBackends": "管理后端",
"backendSwitchAria": "当前模式:{{title}} - 点击切换后端"
"manageBackends": "管理后端"
},
"settingControl": {
"default": "默认值:{{value}}",
Expand Down
3 changes: 1 addition & 2 deletions resources/i18n/zh-TW/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,7 @@
"cancel": "取消"
},
"overviewHeader": {
"manageBackends": "管理後端",
"backendSwitchAria": "當前模式:{{title}} - 點選切換後端"
"manageBackends": "管理後端"
},
"settingControl": {
"default": "預設值:{{value}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ <h2 class="remote-name truncate" [attr.title]="remote.name">{{ remote.name }}</h
[tone]="vc.isActive ? statusIndicatorMeta[vc.key].tone : null"
[selected]="vc.isActive"
[disabled]="vc.isLoading || !vc.canInteract"
[attr.aria-label]="vc.ariaLabel"
[attr.title]="vc.tooltip | translate"
(click)="onChipClick(vc)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ describe('GeneralDetailComponent controls', () => {
const start = vi.spyOn(fixture.componentInstance.startJob, 'emit');
expect(button.textContent?.trim()).toBe('Mount');
expect(button.title).toBe('Mount');
// Named by its visible text, so speech input can say what it shows; the tooltip describes it.
expect(button.hasAttribute('aria-label')).toBe(false);
expect(button.tagName).toBe('BUTTON');
expect(button.getAttribute('aria-pressed')).toBe('false');
button.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { AutomationService } from 'src/app/services/operations/automation.servic
import { WorkflowStorageService } from 'src/app/services/flow/workflow-storage.service';
import { RemoteFacadeService } from 'src/app/services/facade/remote-facade.service';
import { PathService } from 'src/app/services/infrastructure/platform/path.service';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import { TranslatePipe } from '@ngx-translate/core';
import { MatDialog } from '@angular/material/dialog';
import {
ItemOrderVisibilityModalComponent,
Expand Down Expand Up @@ -83,7 +83,6 @@ export class GeneralDetailComponent {
protected readonly statusIndicatorMeta = STATUS_INDICATOR_META;
protected readonly iconService = inject(IconService);
private readonly automationService = inject(AutomationService);
private readonly translate = inject(TranslateService);
private readonly remoteFacade = inject(RemoteFacadeService);
private readonly quickRunService = inject(QuickRunService);
private readonly workflowStorage = inject(WorkflowStorageService);
Expand Down Expand Up @@ -208,7 +207,6 @@ export class GeneralDetailComponent {
const isActive = config.getActiveState(remote);
const tooltip = isActive ? meta.stopTooltip : meta.startTooltip;
const icon = isActive ? meta.stopIcon : meta.startIcon;
const ariaLabel = this.translate.instant(tooltip);

const isLoading = isOperationActionInProgress(actions, key);

Expand All @@ -222,7 +220,6 @@ export class GeneralDetailComponent {
canInteract: !isLoading,
isLoading,
tooltip,
ariaLabel,
});
});
return models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</app-overview-header>
</header>

<div class="overview-content" role="main">
<div class="overview-content">
<app-overview-panels
#panels
[layout]="layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[disabled]="stepDisabled"
(click)="stepSelected.emit(stepNum)"
[class.completed]="isCompleted"
[attr.aria-selected]="isCurrent"
[attr.aria-current]="isCurrent ? 'step' : null"
[attr.title]="config.label | translate"
>
<mat-icon
Expand Down Expand Up @@ -99,7 +99,7 @@
[activated]="isActive"
[disabled]="state.isActiveStepInvalid() || state.isStepNavigationLocked()"
(click)="profileSelected.emit({ type: targetType, name: profile.name })"
[attr.aria-selected]="isActive"
[attr.aria-current]="isActive ? 'true' : null"
[attr.title]="profile.name"
>
<mat-icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ <h2 class="app-name">RClone Manager</h2>
}
</div>

<div class="about-list" role="tablist">
<div class="about-list">
@for (item of navItems; track item.viewId) {
<button
matButton
class="about-item"
role="tab"
[attr.aria-selected]="currentView().id === item.viewId"
(click)="navigateTo(item.viewId)"
[matBadge]="item.viewId === 'about-rclone' ? (rcloneNavBadge() ? '!' : null) : null"
>
Expand All @@ -49,24 +47,16 @@ <h2 class="app-name">RClone Manager</h2>
<button
matButton
class="about-item"
role="tab"
[attr.aria-selected]="currentView().id === 'about-app'"
(click)="navigateTo('about-app')"
[matBadge]="appUpdateAvailable() || appReadyToRestart() ? '!' : null"
>
<span>{{ 'modals.about.aboutApp' | translate }}</span>
<mat-icon svgIcon="chevron-right"></mat-icon>
</button>

<div class="stacked-buttons" role="tablist">
<div class="stacked-buttons">
@for (item of bottomNavItems; track item.viewId; let last = $last) {
<button
matButton
class="about-item"
role="tab"
[attr.aria-selected]="currentView().id === item.viewId"
(click)="navigateTo(item.viewId)"
>
<button matButton class="about-item" (click)="navigateTo(item.viewId)">
<span>{{ item.label | translate }}</span>
<mat-icon [svgIcon]="item.icon"></mat-icon>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { axeViolations } from 'src/testing/axe';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';
import { provideTranslateService } from '@ngx-translate/core';
Expand Down Expand Up @@ -237,6 +238,12 @@ describe('AboutModalComponent', () => {
expect((fixture.nativeElement as HTMLElement).querySelector('.platform-badge')).toBeNull();
});

it('lists its pages as plain buttons, not as tabs', async () => {
const list = (fixture.nativeElement as HTMLElement).querySelector('.about-list') as HTMLElement;
expect(list.querySelector('[role="tablist"], [role="tab"], [aria-selected]')).toBeNull();
expect(await axeViolations(list)).toEqual([]);
});

it('should initialize successfully', () => {
expect(component).toBeTruthy();
expect(component.rCloneManagerVersion).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
data-tone="warn"
(click)="resetAllOptions()"
[disabled]="isResetting()"
[attr.aria-label]="'modals.rcloneFlags.reset.aria' | translate"
[attr.title]="'modals.rcloneFlags.reset.aria' | translate"
>
@if (isResetting()) {
<mat-icon svgIcon="spinner"></mat-icon>
Expand Down
10 changes: 4 additions & 6 deletions src/app/file-browser/nautilus/nautilus.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@
></app-nautilus-sidebar>
</mat-sidenav>

<!-- Only the file browser shown as the page is its main landmark; as an overlay
or a picker it sits above the main UI, which already has one. -->
<mat-sidenav-content class="nautilus-main-content" [attr.role]="isPageView() ? 'main' : null">
@if (isPageView()) {
<h1 class="cdk-visually-hidden">{{ 'titlebar.menu.fileBrowser' | translate }}</h1>
}
<!-- The file browser is always the page's main landmark: as an overlay or a picker it
covers the window, and CoveringOverlayService makes everything behind it inert. -->
<mat-sidenav-content class="nautilus-main-content" role="main">
<h1 class="cdk-visually-hidden">{{ 'titlebar.menu.fileBrowser' | translate }}</h1>
<app-nautilus-toolbar
data-tauri-drag-region
[isMobile]="isMobile()"
Expand Down
26 changes: 1 addition & 25 deletions src/app/file-browser/nautilus/nautilus.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { signal } from '@angular/core';
import { ExplorerRoot, FileBrowserItem } from '@app/types';
import { isNautilusPageView, NautilusComponent } from './nautilus.component';
import { NautilusComponent } from './nautilus.component';

describe('Nautilus folder navigation', () => {
const roots: ExplorerRoot[] = [
Expand Down Expand Up @@ -292,27 +292,3 @@ describe('Nautilus split divider gestures', () => {
expect(document.body.style.cursor).toBe('crosshair');
});
});

describe('Nautilus page landmark', () => {
const base = {
picker: false,
standaloneWindow: false,
defaultView: 'main_menu',
overlayOpen: false,
};

it('is the page in its own window and as the default view', () => {
expect(isNautilusPageView({ ...base, standaloneWindow: true })).toBe(true);
expect(isNautilusPageView({ ...base, defaultView: 'nautilus' })).toBe(true);
});

it('is not the page as an overlay above the main UI, which keeps its own main landmark', () => {
expect(isNautilusPageView({ ...base, overlayOpen: true })).toBe(false);
expect(isNautilusPageView({ ...base, defaultView: 'nautilus', overlayOpen: true })).toBe(false);
});

it('is never the page as a file picker', () => {
expect(isNautilusPageView({ ...base, picker: true, standaloneWindow: true })).toBe(false);
expect(isNautilusPageView({ ...base, picker: true, defaultView: 'nautilus' })).toBe(false);
});
});
22 changes: 0 additions & 22 deletions src/app/file-browser/nautilus/nautilus.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,6 @@ import { NautilusBottomBarComponent } from './bottom-bar/nautilus-bottom-bar.com
import { AndroidShareService } from 'src/app/services/ui/android-share.service';
import { NautilusContextMenuComponent } from './context-menu/nautilus-context-menu.component';

/**
* Whether the file browser is the page itself (its own window, or the default view) rather
* than a picker or an overlay above the main UI, which already has the page's main landmark.
*/
export function isNautilusPageView(state: {
picker: boolean;
standaloneWindow: boolean;
defaultView: string;
overlayOpen: boolean;
}): boolean {
if (state.picker) return false;
return state.standaloneWindow || (state.defaultView === 'nautilus' && !state.overlayOpen);
}

@Component({
selector: 'app-nautilus',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down Expand Up @@ -159,14 +145,6 @@ export class NautilusComponent implements OnInit {
this.uiStateService.activeWorkspace() === 'nautilus'
);
});
protected readonly isPageView = computed(() =>
isNautilusPageView({
picker: this.isPickerMode(),
standaloneWindow: this.nautilusService.isStandaloneWindow(),
defaultView: this.uiStateService.defaultView(),
overlayOpen: this.nautilusService.isBrowserOverlayOpen(),
})
);
protected readonly pickerOptions = computed(
(): FilePickerConfig => this.filePickerState().options ?? DEFAULT_PICKER_OPTIONS
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</app-overview-header>
</header>

<div class="overview-content" role="main">
<div class="overview-content">
<!-- Modular Accordion Panel Grid (with drag & drop) -->
<app-overview-panels #panels [layout]="layout">
<ng-template appOverviewPanel="quickRuns" let-open let-setOpen="setOpen">
Expand Down
7 changes: 1 addition & 6 deletions src/app/layout/titlebar/titlebar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,7 @@
<ng-template #addRemoteMenu>
<div cdkMenu class="material-context-menu">
@for (item of addRemoteMenuItems; track item.label) {
<button
cdkMenuItem
class="menu-item"
(click)="item.action()"
[attr.aria-label]="item.label | translate"
>
<button cdkMenuItem class="menu-item" (click)="item.action()">
<span>{{ item.label | translate }}</span>
<span class="shortcut" aria-hidden="true">{{ item.shortcut }}</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
class="header-btn"
(click)="openBackendModal.emit()"
[attr.title]="'shared.overviewHeader.manageBackends' | translate"
[attr.aria-label]="
'shared.overviewHeader.backendSwitchAria' | translate: { title: title() | translate }
"
>
<!-- Mode icon or app logo -->
<div class="logo-wrap">
@if (mode() === 'general') {
<img src="assets/rclone-manager-2.svg" alt="RClone Manager" class="app-logo" />
<img src="assets/rclone-manager-2.svg" alt="" class="app-logo" />
} @else {
<mat-icon [svgIcon]="iconName()" class="mode-logo" aria-hidden="true"></mat-icon>
}
Expand Down
Loading
Loading