Any reputable chemical supplier will normally sell a mercury spill kit, and anyone working with mercury these days should have one. (Either a commercially prepared one, or an equivalent one that's assembled from individual supplies.) Generally speaking, they contain some sort of absorbent/adsorbent to pick up mercury, and a chemical which will react with the mercury and keep it from volatilizing. Sulfur is a common choice (recommended by the EPA), as mercury sulfide is pretty darn inert, as well as being very insoluble in water. (Also, "flowers of sulfur" does double duty as an absorbent.)
After the cleanup, the absorbent is collected (by sweeping - vacuuming can spread mercury vapors), packaged securely, and sent to a hazardous waste disposal company.
As elemental bromine is less widely used than elemental mercury, designated spill kits for bromine are less widely available, but the procedure is generally the same: spread a chemical to react with the bromine and render it more inert, then spread an absorbent to contain the liquid. Elemental bromine is rather reactive (an oxidizer), so a number of common reducing agents can be used. A 5% solution of sodium thiosulfate is a common choice (1) (2).
Again, if you're working with elemental bromine, your lab should have a spill response kit already assembled, with sufficient pre-prepared sodium thiosufate and absorbent to handle the amount of bromine you normally deal with.
The previous was for general information purposes only. If you are looking to work with elemental mercury or bromine, consult with your institution's chemical safety officer before purchasing for more information and restrictions which may apply in your area. Your institution likely also has chemical safety and spill response training, which will inform you of current best practices in handling mercury and bromine spills.
As always with accident handling, the most important thing is not to put yourself in greater danger by attempting to fix it. If the size or extent of the spill is such that you're unsure you can handle the spill safely, the best course of action is to evacuate the premises and let the hazardous materials team do the cleanup. (They'll likely use the same techniques of reacting and absorbing the material, but they'll be wearing more extensive personal protective equipment while doing it.)