Chemical effects on the conduction-band filling and band-gap renormalization in ZnO thin films doped with group-III elements (Al, Ga, and In) are investigated by means of optical and photoemission experiments and first-principles density-functional calculations. The Fermi-level position, as obtained from ultraviolet photoemission measurements, exhibits a relatively small and positive shift (about 0.4 eV) with respect to the valence band for increasing electron concentrations up to ${10}^{21}\text{ }{\text{cm}}^{\ensuremath{-}3}$. The optical gap exhibits a much larger increase for the same concentration range and the total shift appears to be smaller for In-doped ZnO. Absorption measurements under pressure show that the pressure coefficient of the optical gap is correlated with the electron concentration in films, decreasing with increasing electron concentration. As a consequence, the contributions of band filling and band-gap renormalization to the optical-gap shift can be separated on the basis of the different pressure behavior of the physical parameters involved in each effect. Standard models on band-gap narrowing fail to give account of these results. Supercell density-functional calculations show that the conduction band of heavily doped ZnO is modified by the presence of group-III doping elements, which give rise to small gaps in specific points of the Brillouin zone, modifying the conduction band dispersion in the way predicted, in a much simpler approach, by the band-anticrossing model.