Chosen Solution

Everything works except the power button. The trackpad works and everykey onn the keyboard does as well. Whenever I connect the charger, the computer automatically turns on. Battery is connected and works perfectly. If I connect the charger and then disconect it, the computer runs on the battery with no issues whatsoever.

OK, So you replaced the battery this year good!I don’t see any issues with it so that’s good too! So what could the issue be??? A common issue with older batteries is they swell up as they get old. Some really expand quite a lot! When that happens the battery presses against the bottom cover and the upper case pressing on the trackpad. So what can happen is the bottom cover pops off or which I suspect happened here damages the trackpad and/or the trackpad cable! This series uses the trackpad as a way station for the keyboard signals and both the keyboard and trackpad signals are then passed to the logic board via a single cable. So… You’ll need to start by replacing the MacBook Air 11" (Mid 2011-Mid 2012) Trackpad Cable

Then if that doesn’t fix things replace there trackpad MacBook Air 11" (Mid 2011-Mid 2012) Trackpad Here’s the guide MacBook Air 11" Mid 2012 Trackpad Replacement

I had a similar issue on the exact same computer type - really frustrating to always have to take out the battery and put it back in to turn it on. Turns out it was the replacement keyboard I bought because the caps lock key on the original one was loose. If it is indeed the keyboard, then don’t do what I did and purchase an extremely cheap one with a backlight that broke after installation. Doubt it’s a battery or power related issue since Apple devices usually automatically power up when you plug in the charger.