Why are the angle-of-attack sensors on most airplanes mounted on the forward fuselage rather than at the wing roots?
Would installing the AOA vane (or, in general, sensor) at the wing root be more accurate than installing it near the nose? No, it wouldn't. In fact, it may be slightly worse due to the larger upwash at the wing leading edge and the vane protrusion may even negatively interfere with the wing aerodynamics.

Traditionally, AOA measurements are used for stall warning and, if required, stick pusher. During flight tests, the thresholds for stall warning activation (and stick pusher activation) were calibrated to the local AOA measurements from the vanes to satisfy the certification requirements, while minimizing $V_S$/$V_{SR}$ to maximize performance.

In FBW aircraft, if the control laws have AOA dependency, the control law would typically be designed with aircraft AOA (a.k.a free-stream AOA) as specified in wind tunnel and/or CFD. Therefore, the local AOA measurements would need to be corrected to the aircraft AOA before being consumed by the control laws. Answer to this question outlines the methods for such correction during flight test.

Addendum:

There are a number of other AOA measurement devices besides vane and Smart Probe (used on A220 and E170, E190). The most common ones are leading edge orifices or tabs used on GA aircraft (thanks @JanHudec for pointing out). These operate by sensing the movement of the stagnation point as AOA increases. The downside, of course, is that the stagnation point associated with the required margin to stall is different at varying Mach numbers and across high lift configurations.

This NACA report contains a number of wing-mounted stall warning devices tested in the last century.