diff options
-rw-r--r-- | html.c | 4 | ||||
-rw-r--r-- | html.h | 1 | ||||
-rw-r--r-- | mandoc_html.3 | 4 | ||||
-rw-r--r-- | mdoc_html.c | 5 |
4 files changed, 12 insertions, 2 deletions
@@ -69,6 +69,7 @@ static const struct htmldata htmltags[TAG_MAX] = { {"body", HTML_NLALL}, {"div", HTML_NLAROUND}, {"section", HTML_NLALL}, + {"nav", HTML_NLALL}, {"table", HTML_NLALL | HTML_INDENT}, {"tr", HTML_NLALL | HTML_INDENT}, {"td", HTML_NLAROUND}, @@ -708,6 +709,9 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) case 'i': attr = "id"; break; + case 'r': + attr = "role"; + break; case '?': attr = arg1; arg1 = va_arg(ap, char *); @@ -29,6 +29,7 @@ enum htmltag { TAG_BODY, TAG_DIV, TAG_SECTION, + TAG_NAV, TAG_TABLE, TAG_TR, TAG_TD, diff --git a/mandoc_html.3 b/mandoc_html.3 index fc9751ad..f6e038fa 100644 --- a/mandoc_html.3 +++ b/mandoc_html.3 @@ -221,6 +221,10 @@ option. Print an .Cm id attribute. +.It Cm r +Print an ARIA +.Cm role +attribute. .It Cm \&? Print an arbitrary attribute. This format letter requires two diff --git a/mdoc_html.c b/mdoc_html.c index 2dde0531..dc01f88c 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -515,7 +515,7 @@ static int mdoc_sh_pre(MDOC_ARGS) { struct roff_node *sn, *subn; - struct tag *t, *tsec, *tsub; + struct tag *t, *tnav, *tsec, *tsub; char *id; int sc; @@ -536,6 +536,7 @@ mdoc_sh_pre(MDOC_ARGS) break; if (sc < 2) break; + tnav = print_otag(h, TAG_NAV, "r", "doc-toc"); t = print_otag(h, TAG_H1, "c", "Sh"); print_text(h, "TABLE OF CONTENTS"); print_tagq(h, t); @@ -567,7 +568,7 @@ mdoc_sh_pre(MDOC_ARGS) } print_tagq(h, tsec); } - print_tagq(h, t); + print_tagq(h, tnav); print_otag(h, TAG_SECTION, "c", "Sh"); break; case ROFFT_HEAD: |