Fix tables for screen readers

Avoid announcing every row number which is part of the navigation for
proper tables (read spread sheet). This is a stop gap solution as tables
should not be used for layout at all. But this at least make things
better for screen reader users until this is switched to proper CSS
based layout.
This commit is contained in:
funkonaut 2022-08-29 18:00:31 -05:00 committed by Florian Festi
parent 224f7b25aa
commit 78dec8ed21
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class BServer:
if len(group._group_actions) == 1 and isinstance(group._group_actions[0], argparse._HelpAction):
continue
prefix = getattr(group, "prefix", None)
result.append('''<h3 id="h-%s" class="open" onclick="showHide(%s)">%s</h3>\n<table id="%s">\n''' % (groupid, groupid, _(group.title), groupid))
result.append('''<h3 id="h-%s" class="open" onclick="showHide(%s)">%s</h3>\n<table role="presentation" id="%s">\n''' % (groupid, groupid, _(group.title), groupid))
for a in group._group_actions:
if a.dest in ("input", "output"):
continue