List for cgit developers and users
 help / color / mirror / Atom feed
From: aklhfex at gmail.com (Chris Mayo)
Subject: [PATCH 2/5] Replace table summary attribute with aria-label
Date: Mon, 18 Feb 2019 20:46:41 +0000	[thread overview]
Message-ID: <20190218204644.440-3-aklhfex@gmail.com> (raw)
In-Reply-To: <20190218204644.440-1-aklhfex@gmail.com>

summary is not valid in HTML5.

Signed-off-by: Chris Mayo <aklhfex at gmail.com>
---
 tests/t0105-commit.sh | 2 +-
 ui-commit.c           | 2 +-
 ui-diff.c             | 6 +++---
 ui-repolist.c         | 2 +-
 ui-summary.c          | 2 +-
 ui-tree.c             | 6 +++---
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh
index 9cdf55c..fd4c187 100755
--- a/tests/t0105-commit.sh
+++ b/tests/t0105-commit.sh
@@ -12,7 +12,7 @@ test_expect_success 'find commit subject' '
 '
 
 test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp'
-test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" tmp'
+test_expect_success 'find diffstat' 'grep "<table aria-label=.diffstat. class=.diffstat.>" tmp'
 
 test_expect_success 'find diff summary' '
 	grep "1 files changed, 1 insertions, 0 deletions" tmp
diff --git a/ui-commit.c b/ui-commit.c
index 9a47b54..207854f 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -45,7 +45,7 @@ void cgit_print_commit(char *hex, const char *prefix)
 
 	cgit_print_layout_start();
 	cgit_print_diff_ctrls();
-	html("<table summary='commit info' class='commit-info'>\n");
+	html("<table aria-label='commit info' class='commit-info'>\n");
 	html("<tr><th>author</th><td>");
 	cgit_open_filter(ctx.repo->email_filter, info->author_email, "commit");
 	html_txt(info->author);
diff --git a/ui-diff.c b/ui-diff.c
index 001d77e..eb0a395 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -202,7 +202,7 @@ static void cgit_print_diffstat(const struct object_id *old_oid,
 		html("')");
 	}
 	html("</div>");
-	html("<table summary='diffstat' class='diffstat'>");
+	html("<table aria-label='diffstat' class='diffstat'>");
 	max_changes = 0;
 	cgit_diff_tree(old_oid, new_oid, inspect_filepair, prefix,
 		       ctx.qry.ignorews);
@@ -485,9 +485,9 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
 		return;
 
 	if (use_ssdiff) {
-		html("<table summary='ssdiff' class='ssdiff'>");
+		html("<table aria-label='ssdiff' class='ssdiff'>");
 	} else {
-		html("<table summary='diff' class='diff'>");
+		html("<table aria-label='diff' class='diff'>");
 		html("<tr><td>");
 	}
 	cgit_diff_tree(old_rev_oid, new_rev_oid, filepair_cb, prefix,
diff --git a/ui-repolist.c b/ui-repolist.c
index 41424c0..bab151d 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -293,7 +293,7 @@ void cgit_print_repolist(void)
 	else if (ctx.cfg.section_sort)
 		sort_repolist("section");
 
-	html("<table summary='repository list' class='list nowrap'>");
+	html("<table aria-label='repository list' class='list nowrap'>");
 	for (i = 0; i < cgit_repolist.count; i++) {
 		ctx.repo = &cgit_repolist.repos[i];
 		if (!is_visible(ctx.repo))
diff --git a/ui-summary.c b/ui-summary.c
index 8e81ac4..25f37dd 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -50,7 +50,7 @@ void cgit_print_summary(void)
 		columns++;
 
 	cgit_print_layout_start();
-	html("<table summary='repository info' class='list nowrap'>");
+	html("<table aria-label='repository info' class='list nowrap'>");
 	cgit_print_branches(ctx.cfg.summary_branches);
 	htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
 	cgit_print_tags(ctx.cfg.summary_tags);
diff --git a/ui-tree.c b/ui-tree.c
index df8ad82..08a8505 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -22,7 +22,7 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
 	unsigned long lineno, idx;
 	const char *numberfmt = "<a id='n%1$d' href='#n%1$d'>%1$d</a>\n";
 
-	html("<table summary='blob content' class='blob'>\n");
+	html("<table aria-label='blob content' class='blob'>\n");
 
 	if (ctx.cfg.enable_tree_linenumbers) {
 		html("<tr><td class='linenumbers'><pre>");
@@ -66,7 +66,7 @@ static void print_binary_buffer(char *buf, unsigned long size)
 	unsigned long ofs, idx;
 	static char ascii[ROWLEN + 1];
 
-	html("<table summary='blob content' class='bin-blob'>\n");
+	html("<table aria-label='blob content' class='bin-blob'>\n");
 	html("<tr><th>ofs</th><th>hex dump</th><th>ascii</th></tr>");
 	for (ofs = 0; ofs < size; ofs += ROWLEN, buf += ROWLEN) {
 		htmlf("<tr><td class='right'>%04lx</td><td class='hex'>", ofs);
@@ -264,7 +264,7 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
 static void ls_head(void)
 {
 	cgit_print_layout_start();
-	html("<table summary='tree listing' class='list'>\n");
+	html("<table aria-label='tree listing' class='list'>\n");
 	html("<tr class='nohover'>");
 	html("<th class='left'>Mode</th>");
 	html("<th class='left'>Name</th>");
-- 
2.20.1



  parent reply	other threads:[~2019-02-18 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 20:46 [PATCH 0/5] SVG diffstat graphs and HTML5 aklhfex
2019-02-18 20:46 ` [PATCH 1/5] ui-diff: use SVG for diffstat graphs aklhfex
2019-02-18 20:46 ` aklhfex [this message]
2019-02-18 20:46 ` [PATCH 3/5] Replace self-closing syntax on non-void elements aklhfex
2019-02-18 20:46 ` [PATCH 4/5] ui-log,ui-refs: ensure there are cells for each column aklhfex
     [not found]   ` <CAGFiPxeyoWYT44SUOo-isKeErvYu-c4J78HtWnwse3ueKQV0fA@mail.gmail.com>
     [not found]     ` <CAGFiPxfmGgy0OVCnxNs6aY5RG9XNQGohOerv2Xu0GhV2KHpG5g@mail.gmail.com>
2019-02-18 21:15       ` [PATCH 4/5] ui-log, ui-refs: " 1melissadenee
2019-02-18 20:46 ` [PATCH 5/5] ui-shared: add encoding declaration aklhfex

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190218204644.440-3-aklhfex@gmail.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).