Skip to content

Commit f3a8e1a

Browse files
committed
Accessibility improvement for navigation
1 parent 86a7b15 commit f3a8e1a

10 files changed

Lines changed: 86 additions & 62 deletions

File tree

dist/four-point-seven/forms/misc/body_header.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</txp:evaluate>
66
</header>
77

8-
<nav class="site-navigation" aria-label="<txp:text item="navigation" />" itemscope itemtype="https://schema.org/SiteNavigationElement">
8+
<nav class="site-navigation" aria-label="<txp:text item="site_nav" />" itemscope itemtype="https://schema.org/SiteNavigationElement">
99
<div>
1010
<txp:section_list default_title='<txp:text item="home" />' include_default wraptag="ul" break="">
1111
<li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>>

dist/four-point-seven/forms/misc/search_display.txp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929

3030
<!-- check if there are further results and provide pagination links depending on the result -->
3131
<txp:if_search_results min="11">
32-
<txp:evaluate wraptag="p" class="paginator">
33-
<txp:newer rel="prev">
34-
<txp:text item="prev" />
35-
</txp:newer>
36-
<txp:older rel="next">
37-
<txp:text item="next" />
38-
</txp:older>
32+
<txp:evaluate>
33+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
34+
<txp:newer rel="prev">
35+
<txp:text item="prev" />
36+
</txp:newer>
37+
<txp:older rel="next">
38+
<txp:text item="next" />
39+
</txp:older>
40+
</nav>
3941
</txp:evaluate>
4042
</txp:if_search_results>

dist/four-point-seven/pages/archive.txp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,30 @@
108108
<!-- ...or if you want to list all articles from all sections instead, then replace txp:article with txp:article_custom -->
109109

110110
<!-- add pagination links to foot of article listings if there are more articles available -->
111-
<txp:evaluate wraptag="p" class="paginator">
112-
<txp:newer rel="prev">
113-
<txp:text item="newer" />
114-
</txp:newer>
115-
116-
<txp:older rel="next">
117-
<txp:text item="older" />
118-
</txp:older>
111+
<txp:evaluate>
112+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
113+
<txp:newer rel="prev">
114+
<txp:text item="newer" />
115+
</txp:newer>
116+
<txp:older rel="next">
117+
<txp:text item="older" />
118+
</txp:older>
119+
</nav>
119120
</txp:evaluate>
120121

121122
<txp:else />
122123
<txp:article />
123124

124125
<!-- add pagination links to foot of article if there are more articles available -->
125-
<txp:evaluate wraptag="p" class="paginator">
126-
<txp:link_to_prev>
127-
<txp:text item="prev" />
128-
</txp:link_to_prev>
129-
<txp:link_to_next>
130-
<txp:text item="next" />
131-
</txp:link_to_next>
126+
<txp:evaluate>
127+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
128+
<txp:link_to_prev>
129+
<txp:text item="prev" />
130+
</txp:link_to_prev>
131+
<txp:link_to_next>
132+
<txp:text item="next" />
133+
</txp:link_to_next>
134+
</nav>
132135
</txp:evaluate>
133136
</txp:if_article_list>
134137
</txp:if_search>

dist/four-point-seven/pages/default.txp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@
9494
</txp:if_variable>
9595

9696
<!-- add pagination links to foot of front page/author listings/category listings if there are more articles available -->
97-
<txp:evaluate wraptag="p" class="paginator">
98-
<txp:newer rel="prev">
99-
<txp:text item="newer" />
100-
</txp:newer>
101-
<txp:older rel="next">
102-
<txp:text item="older" />
103-
</txp:older>
97+
<txp:evaluate>
98+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
99+
<txp:newer rel="prev">
100+
<txp:text item="newer" />
101+
</txp:newer>
102+
<txp:older rel="next">
103+
<txp:text item="older" />
104+
</txp:older>
105+
</nav>
104106
</txp:evaluate>
105107
</txp:if_search>
106108

src/dev-docs/mockup-rtl.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2>
1717
<h3>My site slogan</h3>
1818
</header>
1919

20-
<nav class="site-navigation" aria-label="Navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
20+
<nav class="site-navigation" aria-label="Site navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
2121
<div>
2222
<ul class="section_list">
2323
<li>
@@ -495,6 +495,11 @@ <h3>Comment</h3>
495495
</section>
496496
</article>
497497

498+
<nav class="paginator" aria-label="Page navigation">
499+
<a href="#" rel="prev">Previous</a>
500+
<a href="#" rel="next">Next</a>
501+
</nav>
502+
498503
</main>
499504

500505
<aside class="complementary-content">

src/dev-docs/mockup.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2>
1717
<h3>My site slogan</h3>
1818
</header>
1919

20-
<nav class="site-navigation" aria-label="Navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
20+
<nav class="site-navigation" aria-label="Site navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
2121
<div>
2222
<ul class="section_list">
2323
<li>
@@ -495,6 +495,11 @@ <h3>Comment</h3>
495495
</section>
496496
</article>
497497

498+
<nav class="paginator" aria-label="Page navigation">
499+
<a href="#" rel="prev">Previous</a>
500+
<a href="#" rel="next">Next</a>
501+
</nav>
502+
498503
</main>
499504

500505
<aside class="complementary-content">

src/templates/forms/misc/body_header.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</txp:evaluate>
66
</header>
77

8-
<nav class="site-navigation" aria-label="<txp:text item="navigation" />" itemscope itemtype="https://schema.org/SiteNavigationElement">
8+
<nav class="site-navigation" aria-label="<txp:text item="site_nav" />" itemscope itemtype="https://schema.org/SiteNavigationElement">
99
<div>
1010
<txp:section_list default_title='<txp:text item="home" />' include_default wraptag="ul" break="">
1111
<li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>>

src/templates/forms/misc/search_display.txp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929

3030
<!-- check if there are further results and provide pagination links depending on the result -->
3131
<txp:if_search_results min="11">
32-
<txp:evaluate wraptag="p" class="paginator">
33-
<txp:newer rel="prev">
34-
<txp:text item="prev" />
35-
</txp:newer>
36-
<txp:older rel="next">
37-
<txp:text item="next" />
38-
</txp:older>
32+
<txp:evaluate>
33+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
34+
<txp:newer rel="prev">
35+
<txp:text item="prev" />
36+
</txp:newer>
37+
<txp:older rel="next">
38+
<txp:text item="next" />
39+
</txp:older>
40+
</nav>
3941
</txp:evaluate>
4042
</txp:if_search_results>

src/templates/pages/archive.txp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,30 @@
108108
<!-- ...or if you want to list all articles from all sections instead, then replace txp:article with txp:article_custom -->
109109

110110
<!-- add pagination links to foot of article listings if there are more articles available -->
111-
<txp:evaluate wraptag="p" class="paginator">
112-
<txp:newer rel="prev">
113-
<txp:text item="newer" />
114-
</txp:newer>
115-
116-
<txp:older rel="next">
117-
<txp:text item="older" />
118-
</txp:older>
111+
<txp:evaluate>
112+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
113+
<txp:newer rel="prev">
114+
<txp:text item="newer" />
115+
</txp:newer>
116+
<txp:older rel="next">
117+
<txp:text item="older" />
118+
</txp:older>
119+
</nav>
119120
</txp:evaluate>
120121

121122
<txp:else />
122123
<txp:article />
123124

124125
<!-- add pagination links to foot of article if there are more articles available -->
125-
<txp:evaluate wraptag="p" class="paginator">
126-
<txp:link_to_prev>
127-
<txp:text item="prev" />
128-
</txp:link_to_prev>
129-
<txp:link_to_next>
130-
<txp:text item="next" />
131-
</txp:link_to_next>
126+
<txp:evaluate>
127+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
128+
<txp:link_to_prev>
129+
<txp:text item="prev" />
130+
</txp:link_to_prev>
131+
<txp:link_to_next>
132+
<txp:text item="next" />
133+
</txp:link_to_next>
134+
</nav>
132135
</txp:evaluate>
133136
</txp:if_article_list>
134137
</txp:if_search>

src/templates/pages/default.txp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@
9494
</txp:if_variable>
9595

9696
<!-- add pagination links to foot of front page/author listings/category listings if there are more articles available -->
97-
<txp:evaluate wraptag="p" class="paginator">
98-
<txp:newer rel="prev">
99-
<txp:text item="newer" />
100-
</txp:newer>
101-
<txp:older rel="next">
102-
<txp:text item="older" />
103-
</txp:older>
97+
<txp:evaluate>
98+
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
99+
<txp:newer rel="prev">
100+
<txp:text item="newer" />
101+
</txp:newer>
102+
<txp:older rel="next">
103+
<txp:text item="older" />
104+
</txp:older>
105+
</nav>
104106
</txp:evaluate>
105107
</txp:if_search>
106108

0 commit comments

Comments
 (0)