In the classical core-accretion planet formation scenario, rapid inward migration and accretion timescales of kilometer size planetesimals may not favor the formation of massive cores of giant planets before the dissipation of protoplanetary disks. On the other hand, the existence of pressure maxima in the disk could act as migration traps and locations for solid material accumulation, favoring the formation of massive cores. We aim to study the radial drift of pebbles and planetesimals and planet migration at pressure maxima in a protoplanetary disk and their implications for the formation of massive cores as triggering a gaseous runaway accretion phase. The time evolution of a viscosity driven accretion disk is solved numerically introducing a a dead zone as a low-viscosity region in the protoplanetary disk. A population of pebbles and planetesimals evolving by radial drift and accretion by the planets is also considered. Finally, the embryos embedded in the disk grow by the simultaneous accretion of pebbles, planetesimals and the surrounding gas. Our simulations show that the pressure maxima generated at the edges of the low-viscosity region of the disk act as planet migration traps, and that the pebble and planetesimal surface densities are significantly increased due to the radial drift towards pressure maxima locations. However, our simulations also show that migration trap locations and solid material accumulation locations are not exactly at the same positions. Thus, a planet's semi-major axis oscillations around zero torque locations, predicted by MHD and HD simulations, are needed for the planet to accrete all the available material accumulated at the pressure maxima. Pressure maxima generated at the edges of a low-viscosity region of a protoplanetary disk seem to be preferential locations for the formation and trap of massive cores.