Mark permalinks with icons accessibly

Fixes #128
This commit is contained in:
Nolan Lawson 2018-04-15 15:36:34 -07:00
parent d0cf8cac9e
commit 597f425f89
3 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<a rel="nofollow noopener" <a rel="nofollow noopener"
target="_blank" target="_blank"
href="{{href}}" href="{{href}}"
aria-label="{{ariaLabel || ''}}"
class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}"> class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}">
<slot></slot>{{#if showIcon}} <slot></slot>{{#if showIcon}}
<svg class="external-link-svg"> <svg class="external-link-svg">

View File

@ -2,7 +2,11 @@
<Avatar :account size="big" /> <Avatar :account size="big" />
</div> </div>
<div class="account-profile-name"> <div class="account-profile-name">
<ExternalLink href="{{account.url}}" showIcon="true" normalIconColor="true"> <ExternalLink href="{{account.url}}"
showIcon="true"
normalIconColor="true"
ariaLabel="{{account.display_name || account.acct}} (opens in new window)"
>
{{account.display_name || account.acct}} {{account.display_name || account.acct}}
</ExternalLink> </ExternalLink>
</div> </div>

View File

@ -1,5 +1,9 @@
<div class="status-details"> <div class="status-details">
<ExternalLink class="status-absolute-date" href="{{originalStatus.url}}" showIcon="true"> <ExternalLink class="status-absolute-date"
href="{{originalStatus.url}}"
showIcon="true"
ariaLabel="{{formattedDate}} (opens in new window)"
>
<time datetime={{createdAtDate}} title="{{formattedDate}}">{{formattedDate}}</time> <time datetime={{createdAtDate}} title="{{formattedDate}}">{{formattedDate}}</time>
</ExternalLink> </ExternalLink>
<a class="status-favs-reblogs" <a class="status-favs-reblogs"