One of the main contributors to the human errors that lead to catastrophic injuries in the construction workplace is the failure to identify hazards as a result of poor attention or cognitive lapses. To address this safety concern, the present study used eye-tracking technology to assess how the association between work experience and hazard identification may be mediated due to inattention. A mediation analysis was conducted and tested using a bias-corrected bootstrapping technique with 5,000 resamples. The results estimate the direct and indirect effects of work experience on the hazard identification skills of construction workers observing varying hazardous conditions. The results of the mediation analysis confirm that inattention - demonstrated via inattentiveness toward hazards - mediates the relationship between work experience and hazard identification. Specifically, though work experience and dwell time positively correlate with hazard identification, the direct effect of work experience on hazard identification is attenuated with the inclusion of the mediator variables in the model, thus suggesting attentional impairment offsets the benefits of work experience. The outcomes of this study will enable researchers and safety practitioners to harness real-time eye-movement patterns to identify the precursors of cognitive failure, deficient attentional allocation, and poor visual search strategies, all of which may put workers at risk on construction sites. The results also facilitate the design of training interventions that will address unique performance deficiencies in workers to prevent the human errors that cause injuries in dynamic environments.