<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:
- Go to https://shoelace.style/components/dropdown/
- Inspect the DOM of the
<button>trigger of the first<sl-dropdown>instance and note thataria-expandedandaria-haspopupattributes are missing. - Click the
<button>. - Inspect the DOM and see the button now has
aria-expanded=trueandaria-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.
Browser / OS
- OS: Mac
- Browser: Chrome
- Browser version: 143
Additional information
Provide any additional information about the bug here.
Source: shoelace-style/shoelace