Edward J. McElroy , the president of the American Federation of Teachers , announced Tuesday that he would step down in the summer , a move widely expected to put Randi Weingarten , the president of the teachers ' union in New York City , in line to succeed him .