This might be a silly question given I am a physics undergrad, but I was suddenly confused. Usually when EM hit a gap they diffract through the gap. But if the gap is too small, diffraction can't take place. But what is actually happening to prevent the diffraction. I know the definition of a wavelength is the distance from one crest to another (or trough). But isn't that description just because of how we deal with waves mathematically, I mean EM radiation is not actually a sine wave. So what is happening at the gap to prevent the diffraction physically. I hope I made sense, I literally typed this in a few minutes because I just had this question, so I appreciate my points will be over the place. Let me know where you might need clarification.
Actually, this is a nice question $-$ why do the dimensions of the slit or a hole (which are transverse to the direction of your incident plane waves) limit possible range of wavelengths (which are longitudinal, between two EM planes) of the transmitted wave.
Without deriving the behavior from wave equations which would do the job, one may say that it's due to the Huygens principle $-$ every point of space which is excited by a disturbance (i.e. excitation, a coherent electro-magnetic (EM) wave in our case) becomes a retarded (in time) spherical wave source of that disturbance. In the article, it is clearly shown that a slit or hole of the size comparable to or greater than the wavelength of the incident coherent plane wave may become a source of spherical or half-plane/half-spherical waves in Huygens' manner, respectfully, so these waves will be transmitted through the slit/hole. If the size of the slit/hole and the thickness of the screening barrier are less than the wavelength, the transmitted wave will be purely spherical, but its intensity will be proportionally lower due to the reduced size of the slit/hole. But, in case that the hole (not slit) is longer (i.e. thicker barrier), it will behave like a waveguide and some EM transmission modes are not allowed here (see the cut-off wavelength/frequency from Waveguides), hence they will quickly vanish. You can imagine that the wavefront in the slit/hole is not wide enough to constructively fully reconstruct the next wavefront at the wavelength distance, so the wave will be progressively attenuated with the distance.
Furthermore, this has not to be a massive object with a hole $-$ even a single conductive wire (thin compared to the wavelength) will scatter an EM wave. Electrical current is induced within the wire due to the electrical field (E) parallel to the wires and it generates EM components with their E also parallel to the wires which destructively or somewhere constructively interfere with the incident wave. The resulting wave looks like as if the incident wave was scattered from the wire and there is no restriction on its wavelength. Then, a discrete set of equally distanced thin wires also scatters the incident wave, but now these scattered components constructively interfere among themselves which may intensify the final effect depending on the wavelength, distance between the wires and the distance at which we observe the effect. In case that the distance among the wires is comparable to or less than the wavelength, the propagated field with the E component parallel to the wires won't go far from them, i.e. it will be defined mostly as a complex near field, whilst the far field will quickly vanish due to the formed scattered EM wave plane (approximately $-$ becoming more ideal plane as the number of wires increases) which destructively cancels out the incident wave. Notice that the incident waves with the E components normal to the wires generally won't be affected, i.e. the wires are mostly invisible to them. And this is the mechanism behind polarizers.