Skip to content

Conversation

AndreiBaicu26
Copy link
Contributor

@AndreiBaicu26 AndreiBaicu26 commented Sep 4, 2025

Description

Noticed that submenus close when they have a switch inside a custom sp-menu-item. This fix prevents the overlay of the submenu from closing when the user tries to enter the submenu via Tab key.

Motivation and context

In express, we need to have a toggle inside a submenu. TOo have full accessibility support over this control we need to allow the user to reach the toggles inside the submenu and select/deselect them.

Related issue(s)

  • fixes [Issue Number]

Screenshots (if appropriate)

BEFORE
https://github.com/user-attachments/assets/fd89adb7-5199-4bb4-b2a2-3aa83c38b8d1

AFTER
https://github.com/user-attachments/assets/6eab09de-973a-42f0-9ad2-1810a83eeb2c

TESTED MARKUP

<sp-menu style="width: 200px;">
     <sp-menu-item>
        Test
     </sp-menu-item>
     <sp-menu-item>
        Item with arbitrary content in submenu
        <div role="menuitem" slot="submenu" style="padding: 12px">
              <sp-switch>Hello</sp-switch>
             <sp-switch>Hello</sp-switch>
       </div>
    </sp-menu-item>
     <sp-menu-item>
        Item with arbitrary content in submenu
        <div role="menuitem" slot="submenu" style="padding: 12px">
            <sp-button>TEST</sp-button>
            <sp-button>TEST</sp-button
             <sp-switch>Hello</sp-switch>
        </div>
    </sp-menu-item>
      <sp-menu-item>
             Test
        </sp-menu-item>
         <sp-menu-item>
            Test
        </sp-menu-item>
</sp-menu>

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result
  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Copy link

changeset-bot bot commented Sep 4, 2025

⚠️ No Changeset found

Latest commit: 66b14fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 4, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5719

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Tachometer results

Currently, no packages are changed by this PR...

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.

1 participant