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

Adding alt text to user icons #3008

Merged
merged 2 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/default/entity/annotations/image.tpl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="<?php echo strip_tags($annotation['owner_url']) ?>" rel="nofollow" class="icon-container"><img
src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL(strip_tags($annotation['owner_image'])) ?>"
alt="<?php echo htmlentities($annotation['owner_name']) ?>"/></a>
4 changes: 2 additions & 2 deletions templates/default/entity/annotations/likes.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<div class="idno-annotation row">
<div class="idno-annotation-image col-md-1 hidden-sm">
<p>
<a href="<?php echo htmlspecialchars($annotation['owner_url']) ?>" class="icon-container" rel="nofollow"><img src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL($annotation['owner_image'])?>" /></a>
<?php echo $this->__(['annotation' => $annotation])->draw('entity/annotations/image'); ?>
</p>
</div>
<div class="idno-annotation-content col-md-6">
<p>
<a href="<?php echo htmlspecialchars($annotation['owner_url'])?>" rel="nofollow"><?php echo htmlentities($annotation['owner_name'], ENT_QUOTES, 'UTF-8')?></a>
<?php echo \Idno\Core\Idno::site()->language()->_('liked this post'); ?>
<?php echo \Idno\Core\Idno::site()->language()->_('liked this post'); ?>
</p>
<p><small><a href="<?php echo htmlspecialchars($permalink) ?>" rel="nofollow"><?php echo date('M d Y', $annotation['time']);?></a> on <a href="<?php echo htmlspecialchars($permalink) ?>" rel="nofollow"><?php echo parse_url($permalink, PHP_URL_HOST)?></a></small></p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/default/entity/annotations/mentions.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="idno-annotation row">
<div class="idno-annotation-image col-md-1 hidden-sm">
<p>
<a href="<?php echo htmlspecialchars($annotation['owner_url'])?>" rel="nofollow" class="icon-container"><img src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL($annotation['owner_image'])?>" /></a>
<?php echo $this->__(['annotation' => $annotation])->draw('entity/annotations/image'); ?>
</p>
</div>
<div class="idno-annotation-content col-md-6">
Expand Down
3 changes: 1 addition & 2 deletions templates/default/entity/annotations/replies.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<div class="idno-annotation row u-comment h-cite">
<div class="idno-annotation-image col-md-1 hidden-sm">
<p>
<a href="<?php echo strip_tags($annotation['owner_url']) ?>" rel="nofollow" class="icon-container"><img
src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL(strip_tags($annotation['owner_image'])) ?>"/></a>
<?php echo $this->__(['annotation' => $annotation])->draw('entity/annotations/image'); ?>
</p>
</div>
<div class="idno-annotation-content col-md-9">
Expand Down
2 changes: 1 addition & 1 deletion templates/default/entity/annotations/rsvps.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="idno-annotation row">
<div class="idno-annotation-image col-md-1 hidden-sm">
<p>
<a href="<?php echo htmlspecialchars($annotation['owner_url']) ?>" rel="nofollow" class="icon-container"><img src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL($annotation['owner_image'])?>" /></a>
<?php echo $this->__(['annotation' => $annotation])->draw('entity/annotations/image'); ?>
</p>
</div>
<div class="idno-annotation-content col-md-6">
Expand Down
2 changes: 1 addition & 1 deletion templates/default/entity/annotations/shares.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="idno-annotation row">
<div class="idno-annotation-image col-md-1 hidden-sm">
<p>
<a href="<?php echo htmlspecialchars($annotation['owner_url']) ?>" rel="nofollow" class="icon-container"><img src="<?php echo \Idno\Core\Idno::site()->config()->sanitizeAttachmentURL($annotation['owner_image'])?>" /></a>
<?php echo $this->__(['annotation' => $annotation])->draw('entity/annotations/image'); ?>
</p>
</div>
<div class="idno-annotation-content col-md-6">
Expand Down
4 changes: 2 additions & 2 deletions templates/default/entity/shell.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="col-md-1 col-md-offset-1 owner p-author h-card visible-md visible-lg">
<p>
<a href="<?php echo $owner->getDisplayURL() ?>" class="u-url icon-container">
<img class="u-photo" src="<?php echo $owner->getIcon() ?>"/></a><br/>
<img class="u-photo" src="<?php echo $owner->getIcon() ?>" alt="<?php echo htmlentities($owner->getName()); ?>"/></a><br/>
<a href="<?php echo $owner->getDisplayURL() ?>" class="p-name u-url fn"><?php echo htmlentities(strip_tags($owner->getTitle()), ENT_QUOTES, 'UTF-8'); ?></a>
</p>
</div>
Expand All @@ -23,7 +23,7 @@
<!--<div class="visible-xs">
<p class="p-author author h-card vcard">
<a href="<?php echo $owner->getDisplayURL() ?>" class="icon-container"><img
class="u-logo logo u-photo photo" src="<?php echo $owner->getIcon() ?>"/></a>
class="u-logo logo u-photo photo" src="<?php echo $owner->getIcon() ?>" alt="<?php echo htmlentities($owner->getName()); ?>"/></a>
<a class="p-name fn u-url url" href="<?php echo $owner->getDisplayURL() ?>"><?php echo htmlentities(strip_tags($owner->getTitle()), ENT_QUOTES, 'UTF-8') ?></a>
<a class="u-url" href="<?php echo $owner->getDisplayURL() ?>">
</a>
Expand Down