From 69c64b0e24bc4d00e9a1ef1178555c2ccdfd9ac4 Mon Sep 17 00:00:00 2001
From: Daniel Campbell <dlcampbell@gmx.com>
Date: Sat, 20 Oct 2018 01:59:47 -0700
Subject: [PATCH 1/2] ui: remove 'summary' attribute from table elements

The 'summary' attribute is deprecated in HTML 5.

Signed-off-by: Daniel Campbell <dlcampbell@gmx.com>
---
 ui-commit.c   | 2 +-
 ui-diff.c     | 8 ++++----
 ui-repolist.c | 2 +-
 ui-summary.c  | 2 +-
 ui-tree.c     | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ui-commit.c b/ui-commit.c
index 995cb93..3897101 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 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 e33e9fb..5c9011f 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -113,7 +113,7 @@ static void print_fileinfo(struct fileinfo *info)
 	}
 	htmlf("%d", info->added + info->removed);
 	html("</td><td class='graph'>");
-	htmlf("<table summary='file diffstat' width='%d%%'><tr>", (max_changes > 100 ? 100 : max_changes));
+	htmlf("<table width='%d%%'><tr>", (max_changes > 100 ? 100 : max_changes));
 	htmlf("<td class='add' style='width: %.1f%%;'/>",
 	      info->added * 100.0 / max_changes);
 	htmlf("<td class='rem' style='width: %.1f%%;'/>",
@@ -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 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 class='ssdiff'>");
 	} else {
-		html("<table summary='diff' class='diff'>");
+		html("<table 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..2f884e7 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 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..73b3732 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 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 e6b3074..be25918 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 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 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 class='list'>\n");
 	html("<tr class='nohover'>");
 	html("<th class='left'>Mode</th>");
 	html("<th class='left'>Name</th>");
-- 
2.19.1

