Button tab indexes

merge-requests/30/head
Bob Mottram 2022-05-25 11:58:43 +01:00
parent fc7bb70401
commit 7d9dd30e25
2 changed files with 18 additions and 18 deletions

View File

@ -269,7 +269,7 @@ def header_buttons_timeline(default_timeline: str,
tl_str += \ tl_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/search" accesskey="' + access_keys['menuSearch'] + \ '/search" accesskey="' + access_keys['menuSearch'] + \
'" tabindex="2">' + \ '" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/search.png" title="' + \ 'icons/search.png" title="' + \
translate['Search and follow'] + '" alt="| ' + \ translate['Search and follow'] + '" alt="| ' + \
@ -279,7 +279,7 @@ def header_buttons_timeline(default_timeline: str,
# the search button # the search button
tl_str += \ tl_str += \
'<a href="' + users_path + \ '<a href="' + users_path + \
'/search" tabindex="2">' + \ '/search" tabindex="3">' + \
'<button class="button" ' + \ '<button class="button" ' + \
'accesskey="' + access_keys['menuSearch'] + '>' + \ 'accesskey="' + access_keys['menuSearch'] + '>' + \
'<span>' + translate['Search'] + \ '<span>' + translate['Search'] + \
@ -301,7 +301,7 @@ def header_buttons_timeline(default_timeline: str,
' <a class="imageAnchor" href="' + \ ' <a class="imageAnchor" href="' + \
users_path + calendar_path + \ users_path + calendar_path + \
'" accesskey="' + access_keys['menuCalendar'] + \ '" accesskey="' + access_keys['menuCalendar'] + \
'" tabindex="2">' + \ '" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/icons/' + \ '<img loading="lazy" decoding="async" src="/icons/' + \
calendar_image + '" title="' + translate['Calendar'] + \ calendar_image + '" title="' + translate['Calendar'] + \
'" alt="| ' + calendar_alt_text + \ '" alt="| ' + calendar_alt_text + \
@ -309,7 +309,7 @@ def header_buttons_timeline(default_timeline: str,
else: else:
tl_str += \ tl_str += \
'<a href="' + users_path + calendar_path + \ '<a href="' + users_path + calendar_path + \
'" tabindex="2"><button class="button" accesskey="' + \ '" tabindex="3"><button class="button" accesskey="' + \
access_keys['menuCalendar'] + '">' + \ access_keys['menuCalendar'] + '">' + \
'<span>' + translate['Calendar'] + \ '<span>' + translate['Calendar'] + \
'</span></button></a>' '</span></button></a>'
@ -319,7 +319,7 @@ def header_buttons_timeline(default_timeline: str,
if not icons_as_buttons: if not icons_as_buttons:
tl_str += \ tl_str += \
' <a class="imageAnchor" href="' + \ ' <a class="imageAnchor" href="' + \
users_path + '/minimal" tabindex="2">' + \ users_path + '/minimal" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/icons' + \ '<img loading="lazy" decoding="async" src="/icons' + \
'/showhide.png" title="' + translate['Show/Hide Buttons'] + \ '/showhide.png" title="' + translate['Show/Hide Buttons'] + \
'" alt="| ' + translate['Show/Hide Buttons'] + \ '" alt="| ' + translate['Show/Hide Buttons'] + \
@ -327,7 +327,7 @@ def header_buttons_timeline(default_timeline: str,
else: else:
tl_str += \ tl_str += \
'<a href="' + users_path + '/minimal' + \ '<a href="' + users_path + '/minimal' + \
'" tabindex="2"><button class="button">' + \ '" tabindex="3"><button class="button">' + \
'<span>' + translate['Show/Hide Buttons'] + \ '<span>' + translate['Show/Hide Buttons'] + \
'</span></button></a>' '</span></button></a>'

View File

@ -107,7 +107,7 @@ def _html_timeline_new_post(manually_approve_followers: bool,
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newdm?nodropdown" tabindex="9"><img loading="lazy" ' + \ '/newdm?nodropdown" tabindex="3"><img loading="lazy" ' + \
'decoding="async" src="/' + \ 'decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new DM'] + \ translate['Create a new DM'] + \
@ -116,14 +116,14 @@ def _html_timeline_new_post(manually_approve_followers: bool,
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + \ '<a href="' + users_path + \
'/newdm?nodropdown" tabindex="9">' + \ '/newdm?nodropdown" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + ' </span></button></a>' translate['Post'] + ' </span></button></a>'
elif box_name in ('tlblogs', 'tlnews', 'tlfeatures'): elif box_name in ('tlblogs', 'tlnews', 'tlfeatures'):
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newblog" tabindex="9">' + \ '/newblog" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \ translate['Create a new post'] + '" alt="| ' + \
@ -131,14 +131,14 @@ def _html_timeline_new_post(manually_approve_followers: bool,
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + '/newblog" tabindex="9">' + \ '<a href="' + users_path + '/newblog" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
elif box_name == 'tlshares': elif box_name == 'tlshares':
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newshare?nodropdown" tabindex="9">' + \ '/newshare?nodropdown" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new shared item'] + '" alt="| ' + \ translate['Create a new shared item'] + '" alt="| ' + \
@ -147,14 +147,14 @@ def _html_timeline_new_post(manually_approve_followers: bool,
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + \ '<a href="' + users_path + \
'/newshare?nodropdown" tabindex="9">' + \ '/newshare?nodropdown" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
elif box_name == 'tlwanted': elif box_name == 'tlwanted':
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newwanted?nodropdown" tabindex="9">' + \ '/newwanted?nodropdown" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new wanted item'] + '" alt="| ' + \ translate['Create a new wanted item'] + '" alt="| ' + \
@ -163,7 +163,7 @@ def _html_timeline_new_post(manually_approve_followers: bool,
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + \ '<a href="' + users_path + \
'/newwanted?nodropdown" tabindex="9">' + \ '/newwanted?nodropdown" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
else: else:
@ -171,7 +171,7 @@ def _html_timeline_new_post(manually_approve_followers: bool,
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newpost" tabindex="9">' + \ '/newpost" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \ translate['Create a new post'] + '" alt="| ' + \
@ -179,14 +179,14 @@ def _html_timeline_new_post(manually_approve_followers: bool,
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + '/newpost" tabindex="9">' + \ '<a href="' + users_path + '/newpost" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
else: else:
if not icons_as_buttons: if not icons_as_buttons:
new_post_button_str += \ new_post_button_str += \
'<a class="imageAnchor" href="' + users_path + \ '<a class="imageAnchor" href="' + users_path + \
'/newfollowers" tabindex="9">' + \ '/newfollowers" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/' + \ '<img loading="lazy" decoding="async" src="/' + \
'icons/newpost.png" title="' + \ 'icons/newpost.png" title="' + \
translate['Create a new post'] + \ translate['Create a new post'] + \
@ -195,7 +195,7 @@ def _html_timeline_new_post(manually_approve_followers: bool,
else: else:
new_post_button_str += \ new_post_button_str += \
'<a href="' + users_path + \ '<a href="' + users_path + \
'/newfollowers" tabindex="9">' + \ '/newfollowers" tabindex="3">' + \
'<button class="button"><span>' + \ '<button class="button"><span>' + \
translate['Post'] + '</span></button></a>' translate['Post'] + '</span></button></a>'
return new_post_button_str return new_post_button_str