<jats:p>We investigate an electromagnetic Dirichlet type problem for the 2D quaternionic time-harmonic Maxwell system over a great generality of fractal closed type curves, which bound Jordan domains in <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="M1"><mml:msup><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math>. The study deals with a novel approach of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="M2"><mml:mi>h</mml:mi></mml:math>-summability condition for the curves, which would be extremely irregular and deserve to be considered fractals. Our technique of proofs is based on the intimate relations between solutions of time-harmonic Maxwell system and those of the Dirac equation through some nonlinear equations, when both cases are reformulated in quaternionic forms.</jats:p>