EMB ERJ 170/175 ER/LR
Flight Crew Air Transport Pilot (ATP)
Flight Crew Type 3000
Deviation - Speed All Types; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Air Traffic Control Issued New Clearance; Aircraft Equipment Problem Dissipated; Flight Crew Became Reoriented; Flight Crew Returned To Clearance; Flight Crew Overcame Equipment Problem
Environment - Non Weather Related; Human Factors; Weather
Departing from ZZZ; we had been switched to Center and given a climb to 10;000 and direct to Mobile.  Just after breaking out of the clouds the pilot flying; (F.O.) requested the auto pilot.  I reached up and pushed the auto pilot button. We both then reached for our sun visors and sunglasses since we were pointed directly at the sun.  After securing the sun protection; the aircraft enunciated 'bank angle; bank angle'. The 1st officer immediately took the controls back and corrected the course.  The auto pilot was never activated and the aircraft began a right climbing turn.  we deviated 16 degrees off our course; ATC asked if we were direct Mobile after we had already began correcting.  We replied yes and were given a climb to 13000 ft  The aircraft sped up to 285 knots below 10;000 for aprox 15sec.CAMI [Confirm; Activate; Monitor; Intervene] and have your sunglasses ready.
[Report narrative added no additional information.]
An ERJ-170 crew reported the autopilot was not controlling the aircraft as expected; and the crew recovered from an unusual attitude.