(select-frame (next-frame)) is working as (I) intended. The tty
frame you see is controlled by raise-frame/lower-frame. Keyboard
focus is controlled by select-frame. If you want to be sure that
the user can see the frame that they are typing in, you need to
call raise-frame. That is true for X as well as tty frames.