We propose a generalized gradient approximation (GGA) for the angle- and system-averaged exchange-correlation hole of a many-electron system. This hole, which satisfies known exact constraints, recovers the PBEsol (Perdew-Burke-Ernzerhof for solids) exchange-correlation energy functional, a GGA that accurately describes the equilibrium properties of densely packed solids and their surfaces. We find that our PBEsol exchange-correlation hole describes the wavevector analysis of the jellium exchange-correlation surface energy in agreement with a sophisticated time-dependent density-functional calculation (whose three-dimensional wavevector analysis we report here).