I have a 2010 Sonata, and replaced the top console lid latch (Part # 84661-3K000-V2; Description "Latch-Arm 41") after buying it from my Hyundai dealer for $7.67. The job will take about 20 minutes. The console lid schematic can be viewed at this link:
http://www.jimellishyundaiparts.com/showAssembly.aspx?ukey_assembly=414398
[Note that this schematic shows the console as viewed from the back passenger compartment. Not all details of the console lid or the latch placement are shown, or shown clearly. For example, the fact that the lid itself (Part #84660) has a top and bottom half is only indicated by the letters "a" and "b" on the schematic.)
First remove the 4 Phillips screws that hold the bottom half of the lid to the top. (Again,the schematic doesn't show that there is a top and bottom, but by lifting the console lid you can see that there are, and that they're held together by the 4 screws.) The 2 forward screws are easy to access. The back 2 screws are difficult. Since I didn't have a flexible screwdriver, I removed the back panel of the console (Part # 84680D) first. This part is not held on with screws. Gently pry it away, one side at a time. (You'll have to do this from the back passenger compartment. I started on the lower right edge, right above the transmission hump, and then did the opposite side.) Once it's off it's easier to access those back screws (but you may find a small-handled screwdriver best, as it's still limited space.)
Once the screws are removed, gently pry the bottom lid half away from the top using a flat blade screwdriver or a table knife. As you separate the top and bottom, some small broken latch parts will fall out of their places. Don't lose the spring (Part # 85663 E/F). The spring has 2 coils, that fit over 2 side pins of the new latch. (It's these pins, molded onto either side of the latch, that break off so easily.) Also, you'll notice the spring has a U-shaped notch/bend. This notch should rest on top of the latch tab that's just above and to the rear of the pins. (The old tab will have had a rubber piece going through a hole in the tab. If you still have the broken latch with this rubber piece, pry the piece out and re-insert it in the new latch, with the tapered end pointing down. If you've lost it you can still use the new latch. The rubber part appears to just serve as a pad.) With the notch/bend resting on top of the latch tab, the 2 wire ends of the spring will be pointing to the rear. Now put each spring coil over each of the latch pins (carefully, so you don't break the fragile pins). You'll see 2 plastic molded semi-circle notches on the inside front of the bottom lid half that the latch pins slide into. Once the latch pins are in these notches, the latch is essentially installed. If the installation is correct, there should be some tension from the spring that causes the latch catch to go down into the receiving slot on the console, which keeps the lid shut. If this is working right, then replace the 4 screws that hold the top and bottom console lid halves together, and snap the back of the console back into place. Job done.
Unfortunately, paying many thousands of dollars for a car doesn't give buyers access to detailed information. This is part of how manufacturers protect their dealers, giving the dealership mechanics the advantage of knowledge that buyers don't have, and requiring the buyers to spend more to get simple contraptions fixed. If this information has helped you, do the same for other consumers sometime, when you figure out how to fix something, by posting your experience online. That's the best way to help each other. Thanks.