Mark permalinks with icons accessibly (#138)

Fixes #128
This commit is contained in:
Nolan Lawson 2018-04-15 16:00:09 -07:00 committed by GitHub
parent a21541ce4b
commit 300a399655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"