Water and electronics generally do not make happy bedfellows. Your iPad and keyboard are not designed to be water resistant. While they may survive being splashed with water if immediately dried, they will almost certainly suffer irreparable damage if allowed to get wet, or are submerged for any length of time.
If the worst should happen, speed is essential. If the iPad or keyboard get wet, they should be immediately dried with an absorbent towel - then set aside in a warm, dry location to throughly dry. The iPad should be turned-off - and no attempt made to turn-on, use, or charge the iPad until you are absolutely certain that the iPad has fully dried out. Pay particular attention to the charging port.
You might be best advised to seek assistance from the Genius Bar at your local Apple Store or Apple Authorised Service Provider (AASP) - where the technicians will able to test and assess your iPad and keyboard for damage:
Genius Bar Reservation and Apple Support Options - Apple