When you doing Modal UI component, one common aria issue you need to deal with is "Refoucs the opener element when Modal closed".
To do this, you need to use
document.activeElement
You can save in a variable, when modal get closed, call ‘.focus()‘ method on it.