Skip to content

Change close button#311093

Merged
cwebster-99 merged 2 commits intomainfrom
territorial-asp
Apr 20, 2026
Merged

Change close button#311093
cwebster-99 merged 2 commits intomainfrom
territorial-asp

Conversation

@cwebster-99
Copy link
Copy Markdown
Member

@cwebster-99 cwebster-99 commented Apr 17, 2026

Changes "Skip" button to close the walkthrough to a X. Reduce confusion on behavior of Skip vs Next actions

UI Changes:

  • Added a new .onboarding-a-close-btn close button to the upper-right corner of the onboarding card, with appropriate styling and accessibility features. [1] [2]
  • Removed the "Skip" button from the footer and all related logic and references. [1] [2] [3] [4] [5]

Behavior and Accessibility:

  • The close button now triggers the skip/dismiss action for onboarding, and event listeners have been updated to reflect this change.
  • Focus management now prioritizes the close button instead of the removed skip button.

Layout Adjustments:

  • Updated the card container to use position: relative to properly position the new close button.
image

@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 22cc3401 Current: 9652b640

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Dark
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

Copy link
Copy Markdown
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 updates the Welcome Onboarding “Variation A” modal UI by replacing the footer “Skip” action with a close icon button in the card’s upper-right corner, along with the necessary layout and focus adjustments.

Changes:

  • Add an icon-only close button to the onboarding card and wire it to the existing dismiss/skip behavior.
  • Remove the footer “Skip” button and associated references.
  • Update styling to support positioning and visuals for the new close control.
Show a summary per file
File Description
src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts Adds the close button, removes skip button wiring, and updates focus fallback logic.
src/vs/workbench/contrib/welcomeOnboarding/browser/media/variationA.css Makes the card a positioning context and introduces styles for the new close button.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines 1146 to 1153
private _getFocusableElements(): HTMLElement[] {
return [...this.stepFocusableElements, ...this.footerFocusableElements].filter(element => this._isTabbable(element));
}

private _focusCurrentStepElement(): void {
const stepFocusable = this.stepFocusableElements.find(element => this._isTabbable(element));
(stepFocusable ?? this.nextButton ?? this.skipButton)?.focus();
(stepFocusable ?? this.nextButton ?? this.closeButton)?.focus();
}
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The focus-trap order no longer matches the DOM/tab order now that the close button is a tabbable element placed before the step content. _getFocusableElements() returns step elements before closeButton, so Shift+Tab on the first step control wraps to the last control (skipping the close button), and Shift+Tab on the close button can escape the dialog entirely. Consider including closeButton as the first element in the focusables list (separate from footerFocusableElements), so the trap’s first/last align with the actual tab sequence within the dialog.

Copilot uses AI. Check for mistakes.
// Close button (upper-right corner of card)
this.closeButton = append(this.card, $<HTMLButtonElement>('button.onboarding-a-close-btn'));
this.closeButton.type = 'button';
this.closeButton.setAttribute('aria-label', localize('onboarding.close', "Close"));
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The close button is icon-only; it has an aria-label, but it doesn’t set a title tooltip. Elsewhere we typically set a localized title on close/dismiss affordances to provide a hover tooltip and improve discoverability for mouse users.

Suggested change
this.closeButton.setAttribute('aria-label', localize('onboarding.close', "Close"));
const closeButtonLabel = localize('onboarding.close', "Close");
this.closeButton.setAttribute('aria-label', closeButtonLabel);
this.closeButton.title = closeButtonLabel;

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <copilot@github.com>
@cwebster-99 cwebster-99 merged commit de172fb into main Apr 20, 2026
26 checks passed
@cwebster-99 cwebster-99 deleted the territorial-asp branch April 20, 2026 15:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants