Bootstrap 5 change: 'sr-only' is now 'visually-hidden'

This commit is contained in:
Edward Betts 2023-11-09 07:53:33 +01:00
parent 2d7c879756
commit 3b69855c25
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
{# vim: set ft=htmljinja
#}
{% macro render_pagination(pagination) %}
{% if pagination.pages > 1 %}
<nav aria-label="Page navigation example">
@ -10,7 +13,7 @@
{% if page != pagination.page %}
<li class="page-item"><a class="page-link" href="{{ url_for_other_page(page) }}">{{ page }}</a></li>
{% else %}
<li class="page-item active"><a class="page-link" href="{{ url_for_other_page(page) }}">{{ page }} <span class="sr-only">(current)</span></a></li>
<li class="page-item active"><a class="page-link" href="{{ url_for_other_page(page) }}">{{ page }} <span class="visually-hidden">(current)</span></a></li>
{% endif %}
{% else %}
<li><span class="ellipsis"></span></li>

View file

@ -1,6 +1,6 @@
{% macro nav_item(name, label) %}
<li class="nav-item{% if name == active %} active{% endif %}">
<a class="nav-link" href="{{ url_for(name) }}">{{ label }}{% if name == active %} <span class="sr-only">(current)</span>{% endif %}</a>
<a class="nav-link" href="{{ url_for(name) }}">{{ label }}{% if name == active %} <span class="visually-hidden">(current)</span>{% endif %}</a>
</li>
{% endmacro %}