Show month name in keyboard navigation

merge-requests/17/head
Bob Mottram 2021-02-12 15:28:11 +00:00
parent d77bd49c89
commit a18697d0fa
3 changed files with 8 additions and 2 deletions

View File

@ -415,6 +415,7 @@ def htmlCalendar(cssCache: {}, translate: {},
htmlHideFromScreenReader('') + ' ' + translate['Previous month']
navLinks[prevMonthStr] = calActor + '/calendar?year=' + str(prevYear) + \
'?month=' + str(prevMonthNumber)
screenReaderCal = htmlKeyboardNavigation(textModeBanner, navLinks)
screenReaderCal = \
htmlKeyboardNavigation(textModeBanner, navLinks, monthName)
return headerStr + screenReaderCal + calendarStr + htmlFooter()

View File

@ -432,7 +432,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
}
if moderator:
navLinks[menuModeration] = usersPath + '/moderation#modtimeline'
tlStr += htmlKeyboardNavigation(textModeBanner, navLinks,
tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, None,
usersPath, translate, followApprovals)
# banner and row of buttons

View File

@ -887,6 +887,7 @@ def htmlHideFromScreenReader(htmlStr: str) -> str:
def htmlKeyboardNavigation(banner: str, links: {},
subHeading=None,
usersPath=None, translate=None,
followApprovals=False) -> str:
"""Given a set of links return the html for keyboard navigation
@ -896,6 +897,10 @@ def htmlKeyboardNavigation(banner: str, links: {},
if banner:
htmlStr += '<pre aria-label="">' + banner + '<br><br></pre>'
if subHeading:
htmlStr += '<label class="transparent">' + \
subHeading + '</label><br>'
# show new follower approvals
if usersPath and translate and followApprovals:
htmlStr += '<strong><label class="transparent">' + \