Skip to content

Commit

Permalink
add aria attributes to cake day elements (#841)
Browse files Browse the repository at this point in the history
Co-authored-by: BentiGorlich <benjamin_g@posteo.de>
  • Loading branch information
e-five256 and BentiGorlich authored Jun 19, 2024
1 parent ccb672e commit 032c917
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions assets/styles/components/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
font-size: .9rem;
list-style: none;
padding: 0;

li {
div {
i {
padding-right: .5rem;
}
}
}
}

.user__actions {
Expand Down
5 changes: 5 additions & 0 deletions assets/styles/components/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@
padding: 0;
}

div {
i {
padding-right: .5rem;
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion templates/user/_info.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% endif %}
<ul class="info">
<li>{{ 'joined'|trans }}: {{ component('date', {date: user.createdAt}) }}</li>
<li>{{ 'cake_day'|trans }}: <span><i class="fa-solid fa-cake" style="margin-right: .5em"></i>{{ user.createdAt|format_date('short', '', null, 'gregorian', mbin_lang()) }}</span></li>
<li>{{ 'cake_day'|trans }}: <div><i class="fa-solid fa-cake" aria-hidden="true"></i> <span>{{ user.createdAt|format_date('short', '', null, 'gregorian', mbin_lang()) }}</span></div></li>
{% if app.user is defined and app.user is not null and app.user.admin() and user.apId is not null %}
<li>
{{ 'last_updated'|trans }}: {{ component('date', {date: user.apFetchedAt}) }}
Expand Down
6 changes: 4 additions & 2 deletions templates/user/_user_popover.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
<ul>
<li>{{ 'joined'|trans }}: {{ component('date', {date: user.createdAt}) }}</li>
<li>
<i class="fa-solid fa-cake" style="margin-right: .5em;"></i>
<span>{{ user.createdAt|format_date('short', '', null, 'gregorian', mbin_lang()) }}</span>
<div title="{{ 'cake_day'|trans }}" aria-label="{{ 'cake_day'|trans }}">
<i class="fa-solid fa-cake" aria-hidden="true"></i>
<span>{{ user.createdAt|format_date('short', '', null, 'gregorian', mbin_lang()) }}</span>
</div>
</li>
<li>
{%- set TYPE_ENTRY = constant('App\\Repository\\ReputationRepository::TYPE_ENTRY') -%}
Expand Down

0 comments on commit 032c917

Please sign in to comment.