The onus is always on the driver to be aware that pedestrians, children, cyclists, animals etc are around, especially in town, and can always do the unexpected. It is then the responsibility of the driver to avoid them when they do - not say "it was their fault" when a collision occurs. That's why the speed limit in towns is 30mph or less as that reflects the likelihood of those groups doing something untoward. If the driver fails to avoid a pedestrian, cyclist or animal then it is very much the driver's fault.