Joy Con attachment issue

probably not. They are a seperate ribbon cable from the joycon attachment one.

The way the joycon works is as follows:
when seperate from the console but already registered they communicate via bluetooth. When you connect back to the console the bluetooth stops and the joycon talks to the console via serial.

To do this the joycon rail has a 10 pin connection which mates with a 10 pin connection on the console. The console has a ribbon cable that goes to a connector on the motherboard. Have you had the console disassembled? If so the cable could be disconnected or loose.

Assuming the console and joycon don’t have a fault then that leaves the joycon ribbon cable going to the side of the joycon or the console rail with ribbon cable going to the motherboard.