diff options
Diffstat (limited to 'source/ui-repolist.c')
| -rw-r--r-- | source/ui-repolist.c | 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 7 deletions
diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 031cb0d..6dcc976 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -181,7 +181,7 @@ static int any_repos_visible(void) */ static void print_column_header(const char *title, const char *column, const char *currenturl) { - htmlf("<th class='left col-%s'><a href='", column); + htmlf("<th class='left col-%s' scope='col'><a href='", column); html_attr(currenturl); htmlf("?s=%s", column); if (ctx.qry.search) { @@ -193,14 +193,14 @@ static void print_column_header(const char *title, const char *column, const cha static void print_header_row(const char *currenturl) { - html("<tr class='nohover'>"); + html("<tbody class='repos'>\n<tr class='nohover'>"); print_column_header("Name", "name", currenturl); print_column_header("Description", "desc", currenturl); if (ctx.cfg.enable_index_owner) print_column_header("Owner", "owner", currenturl); print_column_header("Idle", "idle", currenturl); if (ctx.cfg.enable_index_links) - html("<th class='left col-links'>Links</th>"); + html("<th class='left col-links' scope='col'>Links</th>"); html("</tr>\n"); } @@ -224,7 +224,8 @@ static void print_repo_row(const char *currenturl, int sublevel) { char *repourl; - htmlf("<tr><td class='col-name %s'>", sublevel ? "sublevel-repo" : "toplevel-repo"); + htmlf("<tr class='repo'><td class='col-name %s'>", + sublevel ? "sublevel-repo" : "toplevel-repo"); cgit_summary_link(ctx.repo->name, NULL, NULL, NULL); html("</td><td class='col-desc'>"); repourl = cgit_repourl(ctx.repo->url); @@ -267,7 +268,7 @@ static void print_pager(int total, int pagelen, char *search, char *sort) int i, ofs; char *class; - html("<ul class='pager'>\n"); + html("<nav class='pager' aria-label='Pager'><ul>\n"); for (i = 0, ofs = 0; ofs < total; i++, ofs = i * pagelen) { class = (ctx.qry.ofs == ofs) ? "current" : NULL; html("<li>"); @@ -275,7 +276,7 @@ static void print_pager(int total, int pagelen, char *search, char *sort) ofs, 0); html("</li>"); } - html("</ul>\n"); + html("</ul></nav>\n"); } static int cmp_str(const char *s1, const char *s2) @@ -420,7 +421,7 @@ void cgit_print_repolist(void) sort_repolist("section"); currenturl = cgit_currenturl(); - html("<table class='list repolist'>\n"); + html("<table class='list repolist' aria-label='Repositories'>\n"); for (i = 0; i < cgit_repolist.count; i++) { char *section; @@ -448,6 +449,8 @@ void cgit_print_repolist(void) } print_repo_row(currenturl, !column_sorted && section); } + if (shown) + html("</tbody>\n"); html("</table>\n"); if (hits > ctx.cfg.max_repo_count) print_pager(hits, ctx.cfg.max_repo_count, ctx.qry.search, ctx.qry.sort); |
