Twisted light is light carrying orbital angular momentum. The profile of such a beam is a ring-like structure with a node at the beam axis, where a phase singularity exits. Due to the strong spatial inhomogeneity the mathematical description of twisted-light--matter interaction is non-trivial, in particular close to the phase singularity, where the commonly used dipole-moment approximation cannot be applied. In this paper we show that, if the polarization and the orbital angular momentum of the twisted-light beam have the same sign, a Hamiltonian similar to the dipole-moment approximation can be derived. However, if the signs of polarization and orbital angular momentum differ, in general the magnetic parts of the light beam become of significant importance and an interaction Hamiltonian which only accounts for electric fields, as in the dipole-moment approximation, is inappropriate. We discuss the consequences of these findings for twisted-light excitation of a semiconductor nanostructures, e.g., a quantum dot, placed at the phase singularity.