Add the button role

This commit is contained in:
Kovid Goyal 2021-01-28 08:53:07 +05:30
parent 1df2ed477e
commit 57d5585224
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -14,7 +14,7 @@ def create_button(text, icon=None, action=None, tooltip=None, highlight=False, d
if icon:
ic = svgicon(icon)
text = '\xa0' + text
ans = E.a(ic, E.span(text), class_='calibre-push-button', href='javascript: void(0)', title=tooltip or '')
ans = E.a(ic, E.span(text), class_='calibre-push-button', href='javascript: void(0)', role='button', title=tooltip or '')
if download_filename and v'"download" in ans':
ans.setAttribute('download', download_filename)
if action is not None: