I was on Stack Overflow looking for an answer to a question. The default (I presume) sort didn't look hopeful, but I wanted to know if there was an accepted answer to look for or to just sort by score (accepted answers aren't always what you want, but I'd like to know one exists).
This is what I saw:
Rather than scrolling down all the way down, visually looking for the green tick, it'd be nice to a) know at least one answer has accepted (not always obvious if you find a question via Google) and b) jump to that answer maybe?
This is possibly more relevant now we don't pin the accepted answer.
Alternatively if we're concerned about influencing people to follow the accepted answer too much we can also link/highlight the Top Answer (wording from Google search results)
Here is some pseudo-code to show it's possible (the #anchor
link doesn't actually work, but you could easily figure it out, and just appending them is not as pretty as the mock-ups):
javascript:(function addAnswerLinks(){
const acceptedAnswerElement = document.createElement('a');
const acceptedAnswerId = $('div.accepted-answer')[0].id;
acceptedAnswerElement.href = `#${acceptedAnswerId}`;
acceptedAnswerElement.textContent = 'Accepted Answer';
const highestScoredElement = document.createElement('a');
const highestScoredId = $('div[data-highest-scored="1"]')[0].id;
highestScoredId.href = `#${highestScoredId}`;
highestScoredId.textContent = 'Accepted Answer';
$('div.answers-subheader h2')[0].appendChild(acceptedAnswerElement);
$('div.answers-subheader h2')[0].appendChild(highestScoredId);
})()
Is this something that's possible to add? Might be especially relevant now that we are Revisiting changes to answer sorting menu.
Do we want this or a different design? Or if we don't want it, please answer with why.
[Click here to jump to the accepted answer.](link)
.""