New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change profile view's display name and detailed status's timestamp to link to canonical URL #20991
base: main
Are you sure you want to change the base?
Conversation
<div className='account__header__tabs__name'> | ||
<a className='account__header__tabs__name' href={`${account.get('url')}`} target='_blank' rel='noopener noreferrer'> | ||
<h1> | ||
<span dangerouslySetInnerHTML={displayNameHtml} /> {badge} | ||
<small>@{acct} {lockedIcon}</small> | ||
</h1> | ||
</div> | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I'd have that be a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning behind this was to give users an easy way to open the remote profile without menu diving, but I'm open to alternative approaches too
externalLink = ( | ||
<React.Fragment> | ||
<React.Fragment> </React.Fragment> | ||
<Icon id='external-link' /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a title
and/or aria-label
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would they contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like “External link”, “External source” or “Original source”?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, in what I assume is the correct way but idk really
@@ -276,8 +288,9 @@ class DetailedStatus extends ImmutablePureComponent { | |||
{media} | |||
|
|||
<div className='detailed-status__meta'> | |||
<a className='detailed-status__datetime' href={`/@${status.getIn(['account', 'acct'])}\/${status.get('id')}`} target='_blank' rel='noopener noreferrer'> | |||
<a className='detailed-status__datetime' href={`${status.get('url')}`} target='_blank' rel='noopener noreferrer' title='${intl.formatMessage(messages.canonical_link)}' aria-label='${intl.formatMessage(messages.canonical_link)}'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm I'm not too sure about adding a label/title here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is that you can hover over the timestamp, so you should be able to see a hint about what it leads to? The external icon is just part of the link at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think aria-label
is appropriate here, the thing's primary purpose is that it's a timestamp, it's not a visual-only thing either, I think aria-label
would incorrectly obscure the timestamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a title
but no aria-label
be appropriate, or should there be a different aria-label
?
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
Follow-up to #20540 -- since these links are in essence "terminal", it can be argued that users may not expect them to open a new tab on their local server, but instead to open the canonical URL.