Are modern airliner avionics spill-proof?
The actual avionics are down below. The units on the center console are just control heads mostly, although they are still boxes with electronics in them.
In new design these days, there is some effort on the design side to make the units coffee resistant, by using sealed switches and rotary control devices, etc.  But they aren't completely water tight.
The components on the lower center console live a difficult life, getting splashed and kicked regularly by coffee spills and people climbing in and out. On smaller cockpits the sub panels near the bottom of the center console close to the seat get replaced quite a lot from getting kicked.
I participated in a project to approve a new switch design in an audio control panel on the CRJ900, which was right in the coffee target zone, and the switch had to be a water resistant design.
Avionics down below, if they are under the passenger cabin, can also get wet from spills in the cabin that migrate down under the floor.  On the CRJ program, certain black boxes had little rain shields incorporated above them to protect the boxes from getting dripped on.  This is expecially bad for components under the floor near entry and service doors where rain can get in and find its way under the floor and run along floor rails to drip some distance from the original source.