theKashey / react-focus-lock

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

[feature] add possibility to pass id to the `FocusLock` element #237

Closed grzegorzpokorski closed 1 year ago

grzegorzpokorski commented 1 year ago

It is nice that we can set which html elment should be FocusLock by provide a value in as prop - I'm very often use that to set FocusLock as a nav element. I think it would be nice to have a ability to set value for id attribute. It is necessary when you would like to set a aria-* atributes which needs an id.

grzegorzpokorski commented 1 year ago

Oh sorry, I overlooked lockProps prop from docs 😬

theKashey commented 1 year ago

And probably that was for react-focus-on. No worries.