Just about the only mechanical thing that shift lever does is put the transmission in park dropping a small pawl in a toothed gear. Oh, it also takes it out of park. Park is also locked by an electric solenoid, to make darn sure you put it in park to switch off engine so your vehicle doesn't roll backwards on your driveway killing your kids. Major lawsuits against the automotive manufacturers mainly because of idiots. One reason why are vehicle prices are skyrocketing.
The big thing the gear shift lever does is rotate a selector switch, what changes what gear you are in is what combination of electrical hydraulic valves are opened or closed that determine what gear you are in, like neutral, no solenoid valves are active, reverse has its own. The signals originate from the engine control computer, use to have its own little box, and if transistors or the microcontroller was bad, around a hundred bucks.
But now all in one box, including cruise control to save on wiring, these boxes are 100% unrepairable and some run around 1,300 bucks. Course if one spark or injector is bad, this same box is trash. But its cheaper to add wires to a connector than to adding a new connector, and OMG, that extra box needs attaching screws.
Had friends and relatives tell me they needed 4,000 bucks for a new transmission, shops don't lie. When the major problem was dirty contacts in the selector switch, use to call this the neutral safety switch, so conductivity only occurs in park or neutral, but now all those extra switches for the transmission gear selection, actually the solenoid valves.
Early AT's had all these controls and brains as part of the transmission, mechanical governors, engine vacuum, and a very expensive control box with mechanically operated valves. All this complicated stuff was eliminated and replaced by a 99 cent microcontroller, but the replacement parts list as skyrocketed.
One nice thing about the Elantra, does have an engine undercover, before this, road salt would splash on the ECU to AT connector and corrode the heck out of it causing no shift problems. Was a heck of a job to clean those. Oh, not really necessary, you need a new AT and ECU. Also have a brake switch to worry about.
This is telling it like it is.