Both, actually. Make it configurable. Right now, tab scans the screen from left to right and picks the next attackable target to the right of the current target (or from the left edge if the current target is not in frame). It's actually a surprisingly inefficient way of doing things from a coding perspective, now that I think about it.
It would be extremely nice to be able to configure it to follow target markers (Attack 1-5, Bind 1-3, DNA 1-2), or the enmity list. It would also be grand to be able to sort the enmity list by various filters, too, while we're dreaming.