#2535·shoelace

<sl-dropdown> missing ARIA attributes until clicked

Author: pete-murphyCreated Jan 2, 2026Updated Jan 2, 2026
Labelsbug

Describe the bug

<sl-dropdown>'s button trigger is missing aria-expanded and aria-haspopup attributes until the button is clicked, at which point the attributes are added. The attributes should be present before interacting with the button.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://shoelace.style/components/dropdown/
  2. Inspect the DOM of the <button> trigger of the first <sl-dropdown> instance and note that aria-expanded and aria-haspopup attributes are missing.
  3. Click the <button>.
  4. Inspect the DOM and see the button now has aria-expanded=true and aria-haspopup=true.

Demo

If the bug isn't obvious, please provide a link to a CodePen or Fiddle with a minimal reproduction. Bugs that have repros get attention faster than those that don't.

Tip: use the CodePen button on any example in the docs!

Screenshots

If applicable, add screenshots to help explain the bug.

Image

Browser / OS

  • OS: Mac
  • Browser: Chrome
  • Browser version: 143

Additional information

Provide any additional information about the bug here.