Fix token rendering in @vue/compat dev builds

What does this MR do?

Fix GlTokenSelector in @vue/compat dev builds

This fixes various rendering issues in the GlTokenSelector component under development builds of @vue/compat.

There is a bug in @vue/compat such that, in a development build, the presence of a comment node surrounded by whitespace is considered valid slot content, which prevents slot default content from rendering.

This only happens in development builds of @vue/compat. Production builds strip out template comments by default.

Vue 2 and 3 proper do not have this bug, in either development or production builds. See the issue linked below for more details.

Addresses #2950

Add visual tests for GlTokenSelector

The component has various accessibility issues which the axe tooling reveals during screenshot tests, so we add aria-allowed-attr to the skip list.

See #2215 (closed).

Screenshots or screen recordings

Note: These changes are only visible in a development build of Storybook.

Before After
simplescreenrecorder-2025-08-14_09.48.39 simplescreenrecorder-2025-08-14_09.49.17
2025-08-14_09-51_1 2025-08-14_09-51

Integrations

Does this MR meet the acceptance criteria?

This checklist encourages the authors, reviewers, and maintainers of merge requests (MRs) to confirm changes were analyzed for conformity with the project's guidelines, security and accessibility.

Toggle the acceptance checklist

Conformity

  • The “What does this MR do?” section in the MR description is filled out, explaining the reasons for and scope of the proposed changes, per “Say why not just what”.
    • For example, if the MR is focused on usage guidelines, addressing accessibility challenges could be added in a separate MR.
  • Relevant label(s) are applied to the MR.
  • The MR is added to a milestone.
  • Added the ~"component:*" label(s) if applicable.

Components

Documentation

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • Security reports checked/validated by a reviewer from the AppSec team

Accessibility

If this MR adds or modifies a component, take a few moments to review the following:

  • All actions and functionality can be done with a keyboard.
  • Links, buttons, and controls have a visible focus state.
  • All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label for icons that have meaning or perform actions.
  • Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false" to aria-expanded="true" when an accordion is expanded.
  • Color combinations have sufficient contrast.
Edited by Mark Florian

Merge request reports

Loading