for a11y reason it's better to use focus than blur. When you focus the dialog, a screen reader will alert the user. Also, when a user uses the "next" action (this is the "tab" key for a keyboard user, but can be something else for a screen reader user on mobile), the various buttons will be selected.

If you use "blur" then nothing is selected, and using the "next" action will go in an unpredicable place.

So here you have the information why we _need_ to use focus instead of blur.

And we need tabIndex = -1 so that we can actually focus.