Please see my comment to the question, in response to the comment by Andy Lanng, as well as his comment itself. Here is the whole thing: your button will be focused in most cases. But if it won't, it means that the user does not want to focus it. You just should not do anything about it. It's really bad to enforce focus without a purpose.
However, you can always use JavaScript
focus
method:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus[
^].
—SA