School of Abjuration Arcane ward feature and ritual abjuration spells

Regarding the Arcane Ward wizard class feature it states

Whenever you cast an abjuration spell of 1st level or higher, the ward regains a number of hit points equal to twice the level of the spell.

A player of mine is, probably correctly, asserting that RAW this means he can, for example, ritual cast Alarm to regain his Arcane Ward’s HP as there is no specification that a spell slot needs to be expended.

The player and I are in agreement that for balance reasons this wont be happening, but I am curious about whether he is technically (the best kind of) correct or if we both missed something in the rules.