The :sidsref: role is intended to highlight like a :sidskey: as well as to link as a :ref:
Thus, it is needed to add a custom sphinx domain for sids that will handle automatic linking of sidsref to the matching headers.
Custom domain is similar to the domain use for cpp and is a python extension.