Skip to content

Commit cd2e1d8

Browse files
cwebster-99Copilot
andcommitted
Refactor onboarding close button handling to ensure it is focusable
Co-authored-by: Copilot <copilot@github.com>
1 parent 64b470f commit cd2e1d8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
181181
this.closeButton.type = 'button';
182182
this.closeButton.setAttribute('aria-label', localize('onboarding.close', "Close"));
183183
this.closeButton.appendChild(renderIcon(Codicon.close));
184-
this.footerFocusableElements.push(this.closeButton);
185184

186185
// Header with progress
187186
const header = append(this.card, $('.onboarding-a-header'));
@@ -1144,7 +1143,7 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
11441143
}
11451144

11461145
private _getFocusableElements(): HTMLElement[] {
1147-
return [...this.stepFocusableElements, ...this.footerFocusableElements].filter(element => this._isTabbable(element));
1146+
return [...(this.closeButton ? [this.closeButton] : []), ...this.stepFocusableElements, ...this.footerFocusableElements].filter(element => this._isTabbable(element));
11481147
}
11491148

11501149
private _focusCurrentStepElement(): void {

0 commit comments

Comments
 (0)