diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Add stable markup hooks for site themes
Diffstat (limited to 'source/ui-stats.c')
| -rw-r--r-- | source/ui-stats.c | 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 12 insertions, 13 deletions
diff --git a/source/ui-stats.c b/source/ui-stats.c index 3960b14..55ed370 100644 --- a/source/ui-stats.c +++ b/source/ui-stats.c @@ -332,10 +332,10 @@ static void print_authors(struct string_list *authors, int max_rows, const struc size_t i, column, rows; long total; - html("<table class='stats'>\n<tr><th>Author</th>"); + html("<table class='stats'>\n<tr><th scope='col'>Author</th>"); for (column = 0; column < labels->nr; column++) - htmlf("<th>%s</th>", labels->items[column].string); - html("<th>Total</th></tr>\n"); + htmlf("<th scope='col'>%s</th>", labels->items[column].string); + html("<th scope='col'>Total</th></tr>\n"); // The row count arrives through ofs, which carries -1 for "all". rows = (max_rows <= 0 || (size_t)max_rows > authors->nr) ? authors->nr : (size_t)max_rows; @@ -375,29 +375,28 @@ static void print_options_form(const struct cgit_period *period, int top) html("<div class='cgit-panel'>\n"); html("<strong>stat options</strong>"); - html("<form method='get'>"); + html("<form method='get' aria-label='Stat options'>"); cgit_add_hidden_formfields(1, 0, "stats"); - html("<table><tr><td colspan='2'></td></tr>\n"); + html("<div class='fields'>"); if (ctx.repo->max_stats > 1) { choices = ctx.repo->max_stats; - html("<tr><td class='label'>Period:</td>"); - html("<td class='ctrl'><select name='period'>"); + html("<label for='stats-period'>Period:</label>"); + html("<select id='stats-period' name='period'>"); for (i = 0; i < choices; i++) html_option(cgit_fmt("%c", periods[i].code), periods[i].name, cgit_fmt("%c", period->code)); - html("</select></td></tr>\n"); + html("</select>\n"); } - html("<tr><td class='label'>Authors:</td>"); - html("<td class='ctrl'><select name='ofs'>"); + html("<label for='stats-authors'>Authors:</label>"); + html("<select id='stats-authors' name='ofs'>"); html_intoption(10, "10", top); html_intoption(25, "25", top); html_intoption(50, "50", top); html_intoption(100, "100", top); html_intoption(-1, "all", top); - html("</select></td></tr>\n"); - html("<tr><td></td><td class='ctrl'>"); + html("</select>\n"); html("<input type='submit' value='reload'>"); - html("</td></tr></table>"); + html("</div>"); html("</form>\n"); html("</div>\n"); } |
