@@ -105,7 +105,7 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
105105 private contentEl : HTMLElement | undefined ;
106106 private backButton : HTMLButtonElement | undefined ;
107107 private nextButton : HTMLButtonElement | undefined ;
108- private skipButton : HTMLButtonElement | undefined ;
108+ private closeButton : HTMLButtonElement | undefined ;
109109 private footerLeft : HTMLElement | undefined ;
110110 private _footerSignInBtn : HTMLButtonElement | undefined ;
111111
@@ -176,6 +176,12 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
176176 // Card
177177 this . card = append ( this . overlay , $ ( '.onboarding-a-card' ) ) ;
178178
179+ // Close button (upper-right corner of card)
180+ this . closeButton = append ( this . card , $ < HTMLButtonElement > ( 'button.onboarding-a-close-btn' ) ) ;
181+ this . closeButton . type = 'button' ;
182+ this . closeButton . setAttribute ( 'aria-label' , localize ( 'onboarding.close' , "Close" ) ) ;
183+ this . closeButton . appendChild ( renderIcon ( Codicon . close ) ) ;
184+
179185 // Header with progress
180186 const header = append ( this . card , $ ( '.onboarding-a-header' ) ) ;
181187 this . progressContainer = append ( header , $ ( '.onboarding-a-progress' ) ) ;
@@ -194,10 +200,6 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
194200 const footer = append ( this . card , $ ( '.onboarding-a-footer' ) ) ;
195201
196202 this . footerLeft = append ( footer , $ ( '.onboarding-a-footer-left' ) ) ;
197- this . skipButton = append ( this . footerLeft , $ < HTMLButtonElement > ( 'button.onboarding-a-btn.onboarding-a-btn-ghost' ) ) ;
198- this . skipButton . textContent = localize ( 'onboarding.skip' , "Skip" ) ;
199- this . skipButton . type = 'button' ;
200- this . footerFocusableElements . push ( this . skipButton ) ;
201203
202204 const footerRight = append ( footer , $ ( '.onboarding-a-footer-right' ) ) ;
203205
@@ -212,7 +214,7 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
212214 this . _updateButtonStates ( ) ;
213215
214216 // Event handlers
215- this . disposables . add ( addDisposableListener ( this . skipButton , EventType . CLICK , ( ) => {
217+ this . disposables . add ( addDisposableListener ( this . closeButton , EventType . CLICK , ( ) => {
216218 this . _logAction ( 'skip' ) ;
217219 this . _dismiss ( 'skip' ) ;
218220 } ) ) ;
@@ -412,15 +414,8 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
412414 this . nextButton . textContent = localize ( 'onboarding.next' , "Continue" ) ;
413415 }
414416 }
415- if ( this . skipButton && this . footerLeft ) {
416- if ( this . currentStepIndex === 0 ) {
417- // Sign-in step: ghost Skip button
418- this . skipButton . className = 'onboarding-a-btn onboarding-a-btn-ghost' ;
419- } else {
420- this . skipButton . className = 'onboarding-a-btn onboarding-a-btn-ghost' ;
421- }
417+ if ( this . footerLeft ) {
422418 if ( this . _isLastStep ( ) ) {
423- this . skipButton . style . display = 'none' ;
424419 // Show sign-in nudge in footer
425420 if ( ! this . _footerSignInBtn && ! this . _userSignedIn ) {
426421 this . _footerSignInBtn = append ( this . footerLeft , $ < HTMLButtonElement > ( 'button.onboarding-a-signin-nudge-btn' ) ) ;
@@ -435,7 +430,6 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
435430 } ) ) ;
436431 }
437432 } else {
438- this . skipButton . style . display = '' ;
439433 if ( this . _footerSignInBtn ) {
440434 this . _footerSignInBtn . remove ( ) ;
441435 this . _footerSignInBtn = undefined ;
@@ -1149,12 +1143,12 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
11491143 }
11501144
11511145 private _getFocusableElements ( ) : HTMLElement [ ] {
1152- 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 ) ) ;
11531147 }
11541148
11551149 private _focusCurrentStepElement ( ) : void {
11561150 const stepFocusable = this . stepFocusableElements . find ( element => this . _isTabbable ( element ) ) ;
1157- ( stepFocusable ?? this . nextButton ?? this . skipButton ) ?. focus ( ) ;
1151+ ( stepFocusable ?? this . nextButton ?? this . closeButton ) ?. focus ( ) ;
11581152 }
11591153
11601154 private _registerStepFocusable < T extends HTMLElement > ( element : T ) : T {
@@ -1210,7 +1204,7 @@ export class OnboardingVariationA extends Disposable implements IOnboardingServi
12101204 this . contentEl = undefined ;
12111205 this . backButton = undefined ;
12121206 this . nextButton = undefined ;
1213- this . skipButton = undefined ;
1207+ this . closeButton = undefined ;
12141208 this . footerLeft = undefined ;
12151209 this . _footerSignInBtn = undefined ;
12161210 this . footerFocusableElements . length = 0 ;
0 commit comments