How do self employed engineers handle warranty situations

Say you fit a replacement fan motor for instance.

Do you offer a full 12 month warranty , so in case of failure the cost of labour , etc is included. ie: the replacement fitted for free of charge.

Im not sure the legal requirement on this. Accepted the part comes with a warranty from manufacturer, but what about the labour?

How can that be warranteed???