Controlling stepper motor direction with push buttons
Try using digitalRead() for button presses. Chances are your buttons, especially when on a breadboard, don't return exactly 0 for analogRead().

IMHO, simple On-Off switches should always connect your pin to either Vcc or GND, with either the internal pullup turned on (if connected to GND), or an external pulldown resistor in place.

To debug this, you might want to Serial.println() the values of your button states to your Arduino IDE and observe if their values are like you'd expect.