How Automatic Failover Works (AlwaysOn)
Does it mean that former primary replica (A) will become primary replica automatically?


No, all that means is when your replica comes back into the picture, and when the Availability Group database gets back in a SYNCHRONIZED state that it would be failover ready.  That operation will not happen automatically.  You indeed would have to either do this "failback" manually, or engineer a way to automate this (rather simple, let me know if you want to explore those options).

From a high-level view, your listing of steps is complete after step #3.