Y is a vowel but treated as consonant

Hi, in the Intermediate Algorithm Scripting for the title Pig Latin it says: Should handle words without vowels. translatePigLatin("rhythm") should return “rhythmay”.
But the letter Y is a vowel I am french I do not know for the other country how this is handled

this is a challenge in english, y is a consonant for the sake of this challenge