We use the variational matrix-product ansatz to study elementary excitations in the S=1/2 ladder with additional diagonal coupling, equivalent to a single S=1/2 chain with alternating exchange and next-nearest neighbor interaction. In absence of alternation the elementary excitation consists of two free S=1/2 particles (spinons) which are solitons in the dimer order. When the nearest-neighbor exchange alternates, the spinons are confined into one S=1 excitation being a soliton in the generalized string order. Variational results are found to be in a qualitative agreement with the exact diagonalization data for 24 spins. We argue that such an approach gives a reasonably good description in a wide range of the model parameters.