mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add the button role
This commit is contained in:
parent
1df2ed477e
commit
57d5585224
@ -14,7 +14,7 @@ def create_button(text, icon=None, action=None, tooltip=None, highlight=False, d
|
|||||||
if icon:
|
if icon:
|
||||||
ic = svgicon(icon)
|
ic = svgicon(icon)
|
||||||
text = '\xa0' + text
|
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':
|
if download_filename and v'"download" in ans':
|
||||||
ans.setAttribute('download', download_filename)
|
ans.setAttribute('download', download_filename)
|
||||||
if action is not None:
|
if action is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user