We report results of numerical and analytical studies of the spontaneous symmetry breaking in solitons, both two-and one-dimensional (2D and 1D), which are trapped in H-shaped potential profiles built of two parallel potential troughs linked by a narrow rung in the transverse direction. This system can be implemented in self-attractive Bose-Einstein condensates (BECs), as well as in a nonlinear bulk optical waveguide. We demonstrate that the introduction of the transverse link changes the character of the symmetry-breaking bifurcation (SBB) in the system from subcritical to supercritical. (In terms of the corresponding phase transition, it is a change between the first and second kinds.) A noteworthy feature of the SBB in this setting is a nonmonotonous dependence of the soliton's norm at the bifurcation point on the strength of the transverse link. In the full 2D system, the results are obtained in a numerical form. An exact analytical solution is found for the bifurcation in the 1D version of the model, with the transverse rung modeled by the local linear coupling between the parallel troughs with the δ-functional longitudinal profile. By replacing the δ function by its finite-width Gaussian counterpart, similar results are obtained by means of the variational approximation (VA). The VA is also applied to the 1D system with a mixed linear and nonlinear transverse localized coupling. Comparison of the results produced by the different varieties of the system clearly reveals basic features of its the symmetry-breaking transition.