That depends on what the "chemicals" were. Even then, salvage fusing is not something "pranksters" generally do. If wouldn't have been so funny if the device had taken off some fingers of, or blinded, the custodian who found them.
You just don't get it! People can be prosecuted for causing bodily harm even if the incident starts with a prank. Terrorism is just any easy way to incarcerate people without due process. It is not right to prosecute everything under terrorism even if explosives, incendiary devices, guns, knives, chains, cannons, or whatever were involved. Prosecution MUST be based upon intent. Fines and imprisonment should be measured for the the harm.