Skip to content

Commit e67cee6

Browse files
committed
per w3c/w3c-website#671, .clean-list and role="list" shouldn't be necessary
1 parent 3fec02d commit e67cee6

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

design-system-templates/example-pages/profile.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<nav id="profile-nav" aria-label="Details">
2020
<div class="profile-nav__inner">
21-
<ul class="clean-list" role="list">
21+
<ul>
2222
<li><a href="#" aria-current="true">Overview</a></li>
2323
<li><a href="path/to/page">Edit profile</a></li>
2424
<li><a href="path/to/page">Calendar</a></li>
@@ -39,4 +39,4 @@
3939
{% endblock %}
4040

4141
{% block scripts %}
42-
{% endblock %}
42+
{% endblock %}

templates/components/styles/pagination.html.twig

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,23 @@
2424
<li><a class="ellipsis">&#8230;</a></li>
2525
{% endif %}
2626

27-
{% for page in pagination.pageLinks %}
27+
{% for pageInfo in pagination.pageLinks %}
28+
{% if pageInfo is iterable %}
29+
{% set page = pageInfo.value %}
30+
{% set label = pageInfo.label %}
31+
{% else %}
32+
{% set page = pageInfo %}
33+
{% endif %}
2834
{% if page != pagination.page %}
2935
<li>
3036
<a href="{{ path(route, query|merge({page: page})) }}">
31-
{{ 'pagination.page'|trans({page: page}, 'w3c_website_templates_bundle') }}
37+
{{ label|default('pagination.page'|trans({page: page}, 'w3c_website_templates_bundle')) }}
3238
</a>
3339
</li>
3440
{% else %}
3541
<li>
3642
<a href="{{ path(route, query|merge({page: page})) }}" aria-current="page">
37-
{{ 'pagination.current_page'|trans({page: page}, 'w3c_website_templates_bundle') }}
43+
{{ label|default('pagination.current_page'|trans({page: page}, 'w3c_website_templates_bundle')) }}
3844
</a>
3945
</li>
4046
{% endif %}

templates/pages/profile.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{% if page.related_pages|length > 0 %}
1313
<nav id="profile-nav" aria-label="{{ profile_nav_title|default('profile_page.nav.title'|trans({}, 'w3c_website_templates_bundle')) }}">
1414
<div class="profile-nav__inner">
15-
<ul class="clean-list" role="list">
15+
<ul>
1616
{% block profile_nav_entries %}
1717
{% for link in page.related_pages %}
1818
{% if link.current is defined and link.current %}

0 commit comments

Comments
 (0)