Skip to content

Angular Aria Implementation for ABP Packages - Issue 24684#24689

Merged
oykuermann merged 9 commits intodevfrom
issue-24684
Jan 27, 2026
Merged

Angular Aria Implementation for ABP Packages - Issue 24684#24689
oykuermann merged 9 commits intodevfrom
issue-24684

Conversation

@fahrigedik
Copy link
Member

Resolves #24684 (write the related issue number if available)

Angular Aria Implementation for ABP Packages

This PR introduces Angular Aria directives to improve accessibility across several ABP Angular packages.

Packages Affected

1. @abp/ng.feature-management

  • Feature Management Tabs: Refactored feature-management.component.html to use Angular Aria ngTabs (Vertical).
  • Replaced ngbNav with ngTabs structure.
  • Implemented selectionMode="follow" for better keyboard navigation.

2. @abp/ng.identity

  • Users Component (Modal): Refactored tab structure in user edit modal to use ngTabs.
  • Ensured default tab selection (User Information) upon opening the modal.
  • Updated logic to use string-based values ('0', '1') compatible with Angular Aria.

3. @abp/ng.permission-management

  • Permission Tree: Replaced Bootstrap nav-pills with Angular Aria ngTabs (Vertical).
  • Implemented onTabChange method to bridge the gap between string-based tab selection and object-based Permission Group state.
  • Preserved existing "Select All" functionality within tabs.

4. @abp/ng.setting-management

  • Settings Tabs: Upgraded settings layout to use ngTabs.

Technical Details

  • Added @angular/aria as a peerDependency to relevant packages (identity, permission-management, theme-basic, setting-management).
  • Ensured keyboard navigation support (Arrow keys) for Tabs and Menus.

How to test it?

you have to change branch issue-24684 on abp
you have to run dev-app and test it.
note : you have to remove symlinks files.

Replaces ng-bootstrap nav components with @angular/aria tab components in the feature management UI for improved accessibility and alignment with Angular's latest standards. Updates dependencies and imports accordingly, and adds @angular/aria as a peer dependency.
Migrates the users component from ng-bootstrap's NgbNav to @angular/aria tab components for tab navigation. Updates the HTML structure and imports, adds a selectedTab property for tab state, and ensures the tab resets when opening the modal. Also updates peerDependencies for @angular/aria in package.json files.
Refactored the permission management component to use @angular/aria tab components for group navigation, improving accessibility and structure. Updated the template and styles to support ngTabs, TabList, Tab, TabPanel, and TabContent. Added @angular/aria as a peer dependency in package.json.
@fahrigedik fahrigedik added this to the 10.2-preview milestone Jan 20, 2026
@fahrigedik fahrigedik requested review from Copilot, oykuermann and sumeyyeKurtulus and removed request for Copilot January 20, 2026 12:11
Changed @angular/aria dependency from a range to a fixed version (21.0.0) in both root and setting-management package.json files for consistency and compatibility.
Copilot AI review requested due to automatic review settings January 21, 2026 06:28
Changed the @angular/aria dependency from a tilde range to an exact version (21.0.0) in all Angular template package.json files for consistency and to avoid unexpected minor updates.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements Angular Aria directives across multiple ABP Angular packages to improve accessibility by replacing ng-bootstrap navigation components with Angular Aria tabs. The changes affect feature-management, identity, permission-management, and setting-management packages.

Changes:

  • Added @angular/aria as a peer dependency to four packages
  • Replaced ng-bootstrap ngbNav components with Angular Aria ngTabs in feature-management, identity, and permission-management
  • Updated CSS selectors to match the new div-based tab structure instead of ul/li elements
  • Implemented keyboard navigation support through selectionMode="follow"

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
npm/ng-packs/packages/setting-management/package.json Added @angular/aria peer dependency with exact version
npm/ng-packs/packages/permission-management/package.json Added @angular/aria peer dependency
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts Imported Angular Aria tab components, updated CSS selectors from ul to .nav-pills, added onTabChange method
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html Refactored from ngbNav to ngTabs with vertical orientation, duplicated tab panel content for each group
npm/ng-packs/packages/identity/package.json Added @angular/aria peer dependency
npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts Imported Angular Aria tab components, added selectedTab property, initialized to '0' in openModal
npm/ng-packs/packages/identity/src/lib/components/users/users.component.html Replaced ngbNav with ngTabs using string-based tab values
npm/ng-packs/packages/feature-management/package.json Added @angular/aria peer dependency
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts Imported Angular Aria tab components and NgStyle
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html Replaced ngbNav with ngTabs vertical layout, moved template positioning, duplicated tab panels for each group
npm/ng-packs/package.json Changed @angular/aria from ~21.0.0 to exact 21.0.0 version

Comment on lines +92 to +101
id="select-all-in-this-tabs"
name="select-all-in-this-tabs"
class="form-check-input"
[(ngModel)]="selectThisTab"
[disabled]="disableSelectAllTab"
(click)="onClickSelectThisTab()"
/>
<label class="form-check-label" for="select-all-in-this-tabs">{{
'AbpPermissionManagement::SelectAllInThisTab' | abpLocalization
}}</label>
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The id attribute "select-all-in-this-tabs" is now used multiple times within the @for loop (once per tab panel). HTML id attributes must be unique within the document. Consider using a dynamic id like "select-all-in-tab-{{group.name}}" and update the corresponding label's for attribute to match.

Suggested change
id="select-all-in-this-tabs"
name="select-all-in-this-tabs"
class="form-check-input"
[(ngModel)]="selectThisTab"
[disabled]="disableSelectAllTab"
(click)="onClickSelectThisTab()"
/>
<label class="form-check-label" for="select-all-in-this-tabs">{{
'AbpPermissionManagement::SelectAllInThisTab' | abpLocalization
}}</label>
[attr.id]="'select-all-in-tab-' + group.name"
name="select-all-in-this-tabs"
class="form-check-input"
[(ngModel)]="selectThisTab"
[disabled]="disableSelectAllTab"
(click)="onClickSelectThisTab()"
/>
<label
class="form-check-label"
[attr.for]="'select-all-in-tab-' + group.name"
>{{
'AbpPermissionManagement::SelectAllInThisTab' | abpLocalization
}}</label
>

Copilot uses AI. Check for mistakes.
<div class="col-md-4">
<div ngTabList orientation="vertical" selectionMode="follow" [(selectedTab)]="selectedGroupDisplayName" class="nav nav-pills flex-column">
@for (group of groups; track group.name) {
<button ngTab #tab="ngTab" [value]="group.displayName" class="nav-link text-start" [class.active]="tab.selected()">
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button element with ngTab directive should include an explicit type="button" attribute to prevent it from being treated as a submit button within a form context. While this is shown in line 66, verify that all tab buttons consistently specify type="button".

Suggested change
<button ngTab #tab="ngTab" [value]="group.displayName" class="nav-link text-start" [class.active]="tab.selected()">
<button ngTab #tab="ngTab" type="button" [value]="group.displayName" class="nav-link text-start" [class.active]="tab.selected()">

Copilot uses AI. Check for mistakes.
@abpframework abpframework deleted a comment from Copilot AI Jan 22, 2026
Updated all occurrences of the @angular/aria dependency from an exact version (21.0.0) to a compatible version (~21.0.0) in package.json files across npm packages and Angular templates. This allows for patch updates and improves compatibility with future releases.
Changed tab values in UsersComponent from numeric ('0', '1') to descriptive string identifiers ('user-info', 'roles') for improved readability and maintainability.
Set type="button" on group tab buttons to ensure correct behavior and prevent unintended form submissions.
Copy link
Contributor

@oykuermann oykuermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oykuermann oykuermann merged commit c59db2f into dev Jan 27, 2026
2 of 3 checks passed
@oykuermann oykuermann deleted the issue-24684 branch January 27, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular Aria Implementation for abp modules

4 participants