Not sure if this applies to all companies, but with mine, you still can take holidays while on maternity leave, and still also accrue holidays.
We get 2 options.
I get 27 days, and can either take them all before I go on maternity leave, or I can wait until the end of the year and request that I get the money for any days still outstanding.
Then come 1st January, I get another 27 days for next year, even though I'll still be on maternity leave!!!!
Hopefully this is the same for you.