Skip to content

Commit

Permalink
fix(stepper): remove delay in focus to next step (backport to 16.x) (#…
Browse files Browse the repository at this point in the history
…1579)

Backport 1c359f2 from #1564. <br> ## PR
Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

&lt;!-- Please check the one that applies to this PR using
&quot;x&quot;. --&gt;

- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?

&lt;!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. --&gt;

Issue Number: [CDE-2295](https://vmw-jira.broadcom.com/browse/CDE-2295)

## What is the new behavior?

## Does this PR introduce a breaking change?

- [ ] Yes
- [x] No

&lt;!-- If this PR contains a breaking change, please describe the
impact and migration path for existing applications below. --&gt;

## Other information
Reverted the fix made for A11y issue
[CDE-699](https://vmw-jira.broadcom.com/browse/CDE-699)

Co-authored-by: Andrea A Fernandes <[email protected]>
  • Loading branch information
github-actions[bot] and andyfeds authored Oct 2, 2024
1 parent cf5ed3b commit 752dcc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions projects/angular/src/accordion/stepper/stepper-panel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { Component, Injectable, ViewChild } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
Expand Down Expand Up @@ -121,7 +121,6 @@ describe('ClrStep Reactive Forms', () => {
expect(input.focus).not.toHaveBeenCalled();

(stepperService as MockStepperService).activeStep.next('groupName');
tick(1500);

expect(input.focus).toHaveBeenCalled();
}));
Expand Down
4 changes: 1 addition & 3 deletions projects/angular/src/accordion/stepper/stepper-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ export class ClrStepperPanel extends ClrAccordionPanel implements OnInit {
this.stepperService.activeStep
.pipe(filter(panelId => isPlatformBrowser(this.platformId) && panelId === this.id))
.subscribe(() => {
//Adding timeout so that the status of the previous step is read by Voice Over on Safari,
//before focusing on the next stepper panel header
setTimeout(() => this.headerButton.nativeElement.focus(), 1500);
this.headerButton.nativeElement.focus();
})
);
}
Expand Down

0 comments on commit 752dcc1

Please sign in to comment.