(Extending my comment to a proper answer) Police custody is, in and of itself, a severe restriction on your freedom. It effectively prevents you from exercising many of your rights, including moving freely, worshipping, talking to whomever you like, etc. That's why, in many countries, it should in principle only happen when it cannot be avoided and only to the extent necessary to attain a limited number of goals explicitly named in statutes (like solving a crime that just happened). That's also why there are procedural rules to follow for the police.
But even within these limits, being held by the police does still undeniably impinge on your fundamental rights, first and foremost the right to come and go as you wish, even though you have not been found guilty of a crime. To the extent that giving this power to the police is deemed appropriate, preventing someone from voting does not seem especially problematic.
Similarly, holding someone against their will is illegal but the police has the right to do it. Basically, in all societies, there is a trade-off between individual freedoms and the public's interest in giving the police the means to enforce the law. We can be dissatisfied about the way the police in a given country uses its prerogatives but the fact is that it can do something like that everywhere.
Also, in many countries (I don't know about the UK), the detention conditions are rather poor and often could be considered a threat to basic human dignity. In a different context, people can also be detained for extended periods of time, not as a punishment or as a result of being found guilty of a crime, but for the purpose of removing them from the country. So our tolerance for restrictions on other people's fundamental rights for the sake of enforcing the laws seem to be quite high and practical difficulties in casting one's vote probably do not rank very high on the list.