Let G be a group with the neutral element e. If \(R=\bigoplus _{g\in G}R_g\) is a G-graded ring with unity 1, then it is well-known that \(1\in R_e.\) In general, let \(\Delta \) be a cancellative magma and \(R=\bigoplus _{\delta \in \Delta }R_\delta \) a \(\Delta \) -graded ring with unity 1. The set \(\bigcup _{\delta \in \Delta }R_\delta \) of all of its homogeneous elements is denoted by \(H_R,\) and by \(I(\Delta )\) we denote the set of all idempotent elements of \(\Delta .\) Then for each \(\varepsilon \in I(\Delta ),\) the subring \(R_\varepsilon \) is with unity \(1_\varepsilon ,\) and, moreover, for every \(x\in H_R\) there exist \(\xi ,\) \(\eta \in I(\Delta )\) such that \(1_\xi x=x=x1_\eta .\) Let R be a \(\Delta \) -graded ring with these two properties (for instance, a group-graded ring). By \(\mathcal {G}(H_R)\) we denote the undirected power graph of a multiplicative subsemigroup \(H_R\) of R, and by \(\mathcal {G}^\circ (H_R)\) the graph obtained from \(\mathcal {G}(H_R)\) by removing all nonzero vertices \(1_\varepsilon \) and their incident edges. We address a problem raised in [Abawajy, J., Kelarev, A., Chowdhury, M.: Power graphs: a survey. Electron. J. Graph Theory Appl. 1(2), 125–147 (2013)], by characterizing the connectedness of the graph \(\mathcal {G}^\circ (H_R)\) in terms of the nonzero subring components of R. This characterization turns out to be closely related to the nil radical of \(H_R\) as it implies that the graph \(\mathcal {G}^\circ (H_R)\) is connected if and only if its set of vertices forms a nil semigroup.