Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

trwnh
Copy link
Member

@trwnh trwnh commented Nov 18, 2022

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.

Comment on lines 331 to 336
<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>
Copy link
Contributor

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.

Copy link
Member Author

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' />
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would they contain?

Copy link
Contributor

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”?

Copy link
Member Author

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)}'>
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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?

@ineffyble ineffyble added the ui Front-end, design label Nov 24, 2022
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rebase needed 🚧 ui Front-end, design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants