To have the bibtex bibliography properly in the toc I use a \phantomsection and give it a label. Then I add it to the toc using \addcontentsline{toc}{section}{References}. You can see a full example below for clarification.
Now I'd like to reference the bibliography automatically by it's heading string (in my case this heading is "References"). If I change the heading to e.g. "Bibliography" or "Sources" it is supposed to change the reference to that string on it's own. The problem here is that \nameref always uses the heading of the last real section (in my case that is "Some Section").
That problem applies to all bibliography-style lists such as the list of tables, list of figures and list of abrevations. Do you have a solution/workaround for that problem?
\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{hyperref,url}
\usepackage[all]{hypcap}
\bibliographystyle{plainnat}
\begin{document}
\section{Some Section}
Some uninterstion citation: \cite{random}
%%%%%%%%%%%%%%%% Below this line it gets interesting %%%%%%%%%%%%%%%%
Some text \nameref{refer}. % <--- This nameref produces "Some Section" instead of "References"
\phantomsection \label{refer}
\addtocounter{section}{1}
\addcontentsline{toc}{section}{\protect\numberline{\Alph{section}}References}
\bibliography{test}
\end{document}