MacBook Pro Mid-2012 Hard Drive Cable Broken
That yellow cable is a IR sensor cable, connected to a ZIF (Zero Insertion Force) connector. If you don't use or plan to use IR for anything you should be fine in my experience.

As an additional reference this guide at the site ifixit.com describes replacing the hard-drive cable on what is most likely your model. Step 14 in the guide describes the yellow sensor cable: iFixit, replace HD-cable on Macbook Pro 13" Unibody mid 2012, Step 14