It's not cloaking and you are not serving different content, based on whether (you think) the client is a crawler. It's just the content you are posting is interpreted differently by browsers than by a spider. Screen readers will still pick up on the hidden text, text browsers will show it normally. In terms of accessibility, this is a good practice.