primitives
primitives copied to clipboard
aria-controls id on Dialog.Trigger is invalid while the dialog is not open
Bug report
Current Behavior
The trigger is assigned a aria-controls id that doesn't exist in the DOM until the user clicks on the trigger. IBM Equal Access Accessibility Checker reports
The 'id' "radix-:r18:" specified for the ARIA property 'aria-controls' value is not valid
The ARIA property must reference a non-empty unique id of an existing element that is visible
Expected behavior
No invalid ids
Suggested solution
Not sure, perhaps just omit aria-controls here?
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | @radix-ui/react-dialog | 1.1.11 |
| React | n/a | 19.0.0 |
| Browser | Chrome | 136.0.7103.114 |
| Assistive tech | IBM Equal Access Accessibility Checker | 4.0.4 |
| Node | n/a | 22.15.0 |
| npm/yarn/pnpm | yarn | 4.9.1 |
| Operating System | MacOS | 15.5 |