Some sections have transcluded content coming from other pages. When this happens the data-mw-section-id is -1.[1]
I think it should be possible to create a link to edit the transcluded page if Parsoid would also add another attribute to the <section> elements which were coming from transcluded pages.
Example from https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia:WikiProject_Deletion_sorting%2FIndia/825839710:
<section data-mw-section-id="-1"> <h3 typeof="mw:Transclusion" id="Kuldeep_Pai" data-mw='{"parts":[{"template":{"target":{"wt":"Wikipedia:Articles_for_deletion/Kuldeep_Pai","href":"./Wikipedia:Articles_for_deletion/Kuldeep_Pai"},"params":{},"i":0}}]}'> <a rel="mw:WikiLink" href="./Kuldeep_Pai" title="Kuldeep Pai">Kuldeep Pai</a> </h3> ...
The wanted information is actually in the h3.data-mw attribute. I think it would make more sense and would be easier to consume if the transclusion information (typeof="mw:Transclusion" + data-mw) was on the <section> element instead of the <h3>. Or even better if there was a data-mw-page or similar attribute with just the page title of the transcluded page.
Parsoid devs, does this sound reasonable?