Where does the phrase “right up one’s alley” come from and What does it mean?

Peculiarly adapted to one’s ability or talent, or particularly attractive to one: “By virtue of his knowledge of Greek and Latin, work on a dictionary was right down Phil’s alley”; “That ad for a young man to drive a car to Mexico was right up my alley.”

It has been suggested, learnedly, that the expression “right up one’s alley” may have originated from baseball, from the fact that “down the alley” means a ball so hit as to go between the fielders, usually good for a home run.

But I am inclined to think that “alley,” in these phrases, is merely a substitute for “street,” or the locality on which one lives, that “right down (or up) my alley” is merely a figurative way of saying “right in the locality (or specialty) in which I am most at home, or most familiar.”