The system you are talking about is called steer-by-wire and has been attempted in the past. The only vehicle I'm aware of which has attempted it was the Infiniti Q50, but it seems after negative commentary, the systems were removed for a traditional column steered version.
Certain systems in the car such as the throttle and brakes have been brought over to a strictly drive-by-wire system, where the computer controls the workings of each. These systems bring a lot of weight savings into the vehicle and therefore make the vehicle more efficient.
There have been vehicles which are partially steer-by-wire, such as the GM full size pickups & SUVs with Quadrasteer, which allows the rear wheels to be turned by the computer in certain situations to allow for tighter turning and crab-walking the vehicle while driving.
For legality purposes, it really depends on where you are at in the world as to whether it's legal. It is illegal in many countries (as Solar Mike points out about the UK). Other countries may not be as strict about whether it can be used or not. Realistically, it will take a lot of testing and trials before it could be realized in any country. I would like to point out, though, many airliners to include the Airbus A320 and Boeing 777 are both fly-by-wire systems. If they can do it for airliners, it probably wouldn't be too difficult to do it for automobiles. Consumer acceptance of automobiles may be a bit tougher than airliners, though. Many people have no clue (nor do they want one) about how an airliner works. They just leave it to others to figure it out and as long as they stay in the air, it's all good. Since people control vehicles directly, they want to have more control of the vehicle (whether real or perceived). Just like airliners, cars would need redundant systems to ensure they continue to function correctly under any circumstances.