theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.27k stars 67 forks source link

Not possible to pass trough attributes #216

Closed ghost closed 2 years ago

ghost commented 2 years ago

It's not possible to pass trough attributes to underlying html element. For example role attribute to div: <FocusLock returnFocus as={'div'} className='dialog role="document">`

ghost commented 2 years ago

Sorry, my bad. documentation mentions lockProps={{ role: 'document' }}. I was just expecting this to be handled seamlessly as in Headless UI