Skip to content

refactor(carousel): Tab order of carousel items#17456

Open
rkaraivanov wants to merge 1 commit into
masterfrom
rkaraivanov/carousel-focus-tab-order
Open

refactor(carousel): Tab order of carousel items#17456
rkaraivanov wants to merge 1 commit into
masterfrom
rkaraivanov/carousel-focus-tab-order

Conversation

@rkaraivanov

Copy link
Copy Markdown
Member

Description

Changed the default tab order of the component,
focus now flows starting with its indicator container, navigation buttons, or the first focusable element in the active slide, whichever is available.

Motivation / Context

Related to #2291.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Behavioral change
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Changed the default tab order of the component,
focus now flows starting with its indicator container, navigation buttons,
or the first focusable element in the active slide, whichever is available.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the IgxCarouselComponent template to change the keyboard tab/focus order for improved accessibility and aligns the release notes to document the behavioral change.

Changes:

  • Reordered the carousel indicators before the navigation buttons in the DOM to make indicators appear earlier in the tab sequence.
  • Added a new changelog entry documenting the carousel’s updated default tab order.

Reviewed changes

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

File Description
projects/igniteui-angular/carousel/src/carousel/carousel.component.html Moves the indicators block before navigation buttons to change the default tab sequence.
CHANGELOG.md Documents the carousel tab-order behavioral change (and includes minor formatting/whitespace adjustments nearby).

Comment on lines +19 to +21
@if (showIndicators) {
<div [ngClass]="indicatorsClass" [attr.role]="'tablist'" (keyup)="handleKeyUp($event)" (focusout)="handleFocusOut($event)" (click)="handleClick()" (keydown)="handleKeydown($event)">
@for (slide of slides; track slide) {
Comment thread CHANGELOG.md
Comment on lines +75 to +76
- `IgxCarouselComponent`
- Changed the default tab order of the component, focus now flows starting with its indicator container, navigation buttons, or the first focusable element in the active slide, whichever is available.
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.

2 participants