Accessibility Issue: Tab Navigation Elements Need ARIA Labeling
WCAG Level: A
Severity: Medium
Category: ARIA Usage / Semantic HTML
Issue Description
The application uses custom tab navigation implemented with <div> elements that have role="tab". While the role is correctly applied, these tabs lack proper aria-selected state management and the tab lists lack role="tablist" containers.
User Impact
- Affected Users: Screen reader users
- Severity: Users cannot determine which tab is currently selected or navigate efficiently through tab interfaces
Violations Found
File: src/app/shared/components/settings/settings.component.html
Lines: 9-11
<nav mat-tab-nav-bar mat-stretch-tabs="false" mat-align-tabs="start" [tabPanel]="tabPanel">
<div routerLink="{{links[0].link}}" tabindex="1" role="tab" mat-tab-link class="mat-tab-label" [active]="activeLink === links[0].link" (click)="activeLink = links[0].link">{{links[0].name}}</div>
<div *ngIf="!+appConfig.SSO.rtlSSO" routerLink="{{links[1].link}}" tabindex="2" role="tab" mat-tab-link class="mat-tab-label" [active]="activeLink === links[1].link" [state]="{ initial: false }" (click)="activeLink = links[1].link">{{links[1].name}}</div>
Issue: Tabs have role="tab" but missing aria-selected state binding
File: src/app/cln/routing/routing.component.html
Line: 11
<div *ngFor="let link of links" routerLink="{{link.link}}" tabindex="1" mat-tab-link role="tab" class="mat-tab-label" [active]="activeLink === link.link" (click)="activeLink = link.link">{{link.name}}</div>
Recommended Fix
<nav mat-tab-nav-bar mat-stretch-tabs="false" mat-align-tabs="start" [tabPanel]="tabPanel" role="tablist" aria-label="Settings navigation">
<div
routerLink="{{links[0].link}}"
role="tab"
mat-tab-link
class="mat-tab-label"
[attr.aria-selected]="activeLink === links[0].link"
[attr.tabindex]="activeLink === links[0].link ? 0 : -1"
(click)="activeLink = links[0].link"
(keydown.arrowRight)="focusNextTab()"
(keydown.arrowLeft)="focusPrevTab()">
{{links[0].name}}
</div>
Changes Made:
- Add
role="tablist" to the nav container (or ensure Angular Material provides this)
- Add
aria-label to tablist for context
- Bind
aria-selected to active state
- Implement roving tabindex (only active tab in tab order)
- Add arrow key navigation for tab switching
- Remove positive tabindex values
Additional Instances
All files with tab navigation patterns:
src/app/shared/components/node-config/node-config.component.html
src/app/shared/components/node-config/services-settings/services-settings.component.html
src/app/cln/graph/graph.component.html
src/app/cln/transactions/transactions.component.html
src/app/cln/on-chain/on-chain.component.html
src/app/cln/reports/reports.component.html
src/app/lnd/graph/graph.component.html
src/app/lnd/transactions/transactions.component.html
src/app/lnd/routing/routing.component.html
src/app/eclair/graph/graph.component.html
- And more...
Testing Instructions
- Use screen reader (NVDA/VoiceOver) to navigate tab interfaces
- Verify tab role is announced
- Verify selected state is announced
- Test arrow key navigation between tabs
- Verify tablist container is announced
Resources
Acceptance Criteria
Accessibility Issue: Tab Navigation Elements Need ARIA Labeling
WCAG Level: A
Severity: Medium
Category: ARIA Usage / Semantic HTML
Issue Description
The application uses custom tab navigation implemented with
<div>elements that haverole="tab". While the role is correctly applied, these tabs lack properaria-selectedstate management and the tab lists lackrole="tablist"containers.User Impact
Violations Found
File:
src/app/shared/components/settings/settings.component.htmlLines: 9-11
Issue: Tabs have
role="tab"but missingaria-selectedstate bindingFile:
src/app/cln/routing/routing.component.htmlLine: 11
Recommended Fix
Changes Made:
role="tablist"to the nav container (or ensure Angular Material provides this)aria-labelto tablist for contextaria-selectedto active stateAdditional Instances
All files with tab navigation patterns:
src/app/shared/components/node-config/node-config.component.htmlsrc/app/shared/components/node-config/services-settings/services-settings.component.htmlsrc/app/cln/graph/graph.component.htmlsrc/app/cln/transactions/transactions.component.htmlsrc/app/cln/on-chain/on-chain.component.htmlsrc/app/cln/reports/reports.component.htmlsrc/app/lnd/graph/graph.component.htmlsrc/app/lnd/transactions/transactions.component.htmlsrc/app/lnd/routing/routing.component.htmlsrc/app/eclair/graph/graph.component.htmlTesting Instructions
Resources
Acceptance Criteria
aria-selectedstate boundrole="tablist"