diff options
Diffstat (limited to 'source/ui-log.c')
| -rw-r--r-- | source/ui-log.c | 41 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 22 insertions, 19 deletions
diff --git a/source/ui-log.c b/source/ui-log.c index 86cb756..9f21114 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -227,7 +227,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) print_graph_above(revs, &graphbuf, columns); info = cgit_parse_commit(commit); - htmlf("<tr%s>", ctx.qry.showmsg ? " class='logheader'" : ""); + htmlf("<tr class='commit%s'>", ctx.qry.showmsg ? " logheader" : ""); if (revs->graph) { html("<td class='commitgraph'>"); @@ -372,11 +372,11 @@ static void print_pager(struct rev_info *revs, int ofs, int cnt) { struct commit *more = get_revision(revs); - html("</table>\n"); + html("</tbody>\n</table>\n"); // A single page needs no pager, and an empty list has nothing to page. if (ofs <= 0 && !more) return; - html("<ul class='pager'>"); + html("<nav class='pager' aria-label='Pager'><ul>"); if (ofs > 0) { html("<li>"); cgit_log_link( @@ -393,7 +393,7 @@ static void print_pager(struct rev_info *revs, int ofs, int cnt) ); html("</li>"); } - html("</ul>"); + html("</ul></nav>"); } /* @@ -562,15 +562,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern if (pager) { cgit_print_layout_start(); - html("<table class='list'>\n"); + html("<table class='list log' aria-label='Commits'>\n"); } - html("<tr class='nohover'>"); + html("<tbody class='log'>\n<tr class='nohover'>"); if (commit_graph) html("<th></th>"); else - html("<th class='left'>Age</th>"); - html("<th class='left'>Commit message"); + html("<th class='left' scope='col'>Age</th>"); + html("<th class='left' scope='col'>Commit message"); if (pager) { html(" ("); cgit_log_link( @@ -580,15 +580,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern ); html(")"); } - html("</th><th class='left col-author'>Author</th>"); + html("</th><th class='left col-author' scope='col'>Author</th>"); if (rev.graph) - html("<th class='left'>Age</th>"); + html("<th class='left' scope='col'>Age</th>"); if (ctx.repo->enable_log_filecount) { - html("<th class='left col-count'>Files</th>"); + html("<th class='left col-count' scope='col'>Files</th>"); columns++; } if (ctx.repo->enable_log_linecount) { - html("<th class='left col-count'>Lines</th>"); + html("<th class='left col-count' scope='col'>Lines</th>"); columns++; } html("</tr>\n"); @@ -617,13 +617,16 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern if (pager) { print_pager(&rev, ofs, cnt); cgit_print_layout_end(); - } else if ((commit = get_revision(&rev))) { - htmlf("<tr class='nohover'><td colspan='%d'>", columns); - cgit_log_link( - "[...]", NULL, NULL, ctx.qry.head, NULL, ctx.qry.vpath, 0, - NULL, NULL, ctx.qry.showmsg, ctx.qry.follow - ); - html("</td></tr>\n"); + } else { + if ((commit = get_revision(&rev))) { + htmlf("<tr class='nohover'><td colspan='%d'>", columns); + cgit_log_link( + "[...]", NULL, NULL, ctx.qry.head, NULL, ctx.qry.vpath, 0, + NULL, NULL, ctx.qry.showmsg, ctx.qry.follow + ); + html("</td></tr>\n"); + } + html("</tbody>\n"); } if (must_free_tip) |
