The basic aspects of the Aharonov-Bohm effect can be summarized by the remark that wavefunctions become sections of a line bundle with a flat connection (that is, a flat potential). Passing at the level of quantum field theory in curved spacetimes, we study the Dirac field interacting with a classical (background) flat potential and show that it can be interpreted as a topological sector of the observable net of free Dirac field. On the converse, starting from a topological sector we reconstruct a classical flat potential, interpreted as an interaction of a Dirac field. This leads to a description of Aharonov-Bohm-type effects in terms of localized observables.