-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Accessibility issues #428
Changes from 1 commit
a9d6416
19d43ab
2877481
350e396
89621ff
4b8fcdf
df76c9a
a0756c2
55cef3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,8 +241,9 @@ class BServer: | |
continue | ||
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 role="presentation" id="%s">\n''' % (groupid, groupid, _(group.title), groupid)) | ||
prefix = getattr(group, "prefix", None) | ||
result.append('''<h3 id="h-%s" tabindex="0" class="open" onclick="showHide(%s)" onkeypress="if(event.keyCode == 13) showHide(%s)">%s</h3>\n<table role="presentation" id="%s">\n''' % (groupid, groupid, groupid, _(group.title), groupid)) | ||
|
||
for a in group._group_actions: | ||
if a.dest in ("input", "output"): | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This newline doesn't need to be integrated my bad... |
||
|
@@ -341,7 +342,7 @@ class BServer: | |
""" ] | ||
for nr, group in enumerate(self.groups): | ||
result.append(f''' | ||
<h3 id="h-{nr}" class="open" onclick="showHide('{nr}')" | ||
<h3 id="h-{nr}" class="open" tabindex="0" onclick="showHide('{nr}')" onkeypress="if(event.keyCode == 13) showHide('{nr}')" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adds event handler for keyboard enter press and tab index to allow for tab navigation on clickable headings and a more device independent event handler. |
||
onmouseenter="change('{group.name}', 'static/samples/{group.thumbnail}')" | ||
onmouseleave="changeback('{group.name}')">{_(group.title)}</h3> | ||
<img style="width: 200px;" id="sample-{group.name}" src="static/nothing.png" alt=""> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds event handler for keyboard enter press and tab index to allow for tab navigation on clickable headings and a more device independent event handler.