Enclosure width + depth that becomes effectively in-wall size?

If an enclosure is hung on a wall is there a width and depth size that makes the speaker behave as if it is in-wall?

For example, if you have and enclosure that is 6.75 inches deep (1/4 wavelength for 500Hz) can you make it a 27 inch wide baffle (500Hz wavelength) to make it behave as if it was installed in-wall? In other words, whatever depth your enclosure is you need to make it as wide or wider than the full wavelength that corresponds with the 1/4 wavelength depth of the cabinet if you want it to behave as if it is in-wall. Assuming driver generating that frequency range in the center of that 27 inch wide/tall baffle, although, maybe that isn't necessary.
 
Thanks. I was wondering about it because my TV screen is about 7 inches out from the wall and maybe it could become part of the baffle. In which case the enclosure itself wouldn't need to be the full 27 inches wide. Although, I don't know if it's a good way to build LCR TV speakers like that. Maybe it would sound terrible with spoken dialogue.