Key Message
Previous studies have not systematically detected and quantified the mediating role of AF in causal associations between a wide range of risk factors and stroke types. This study, using several MR approaches, found that the causal associations between risk factors and stroke, and the role of AF in mediating these associations, varied across stroke types. Although AF largely mediated the trait-CES associations, most traits affected AS and AIS independently of AF, highlighting the need for accurate disease classification in clinical practice and trials.