Add skip link to offline message

This commit is contained in:
Gabe Kangas
2023-01-29 16:31:52 -08:00
parent d057834a20
commit 72cc7cb443
2 changed files with 17 additions and 11 deletions

View File

@@ -343,16 +343,18 @@ export const Content: FC = () => {
/> />
)} )}
{!online && !appState.appLoading && ( {!online && !appState.appLoading && (
<OfflineBanner <div id="offline-message">
showsHeader={false} <OfflineBanner
streamName={name} showsHeader={false}
customText={offlineMessage} streamName={name}
notificationsEnabled={browserNotificationsEnabled} customText={offlineMessage}
fediverseAccount={fediverseAccount} notificationsEnabled={browserNotificationsEnabled}
lastLive={lastDisconnectTime} fediverseAccount={fediverseAccount}
onNotifyClick={() => setShowNotifyModal(true)} lastLive={lastDisconnectTime}
onFollowClick={() => setShowFollowModal(true)} onNotifyClick={() => setShowNotifyModal(true)}
/> onFollowClick={() => setShowFollowModal(true)}
/>
</div>
)} )}
{isStreamLive && ( {isStreamLive && (
<Statusbar <Statusbar

View File

@@ -29,10 +29,14 @@ export const Header: FC<HeaderComponentProps> = ({
online, online,
}) => ( }) => (
<header className={cn([`${styles.header}`], 'global-header')}> <header className={cn([`${styles.header}`], 'global-header')}>
{online && ( {online ? (
<Link href="#player" className={styles.skipLink}> <Link href="#player" className={styles.skipLink}>
Skip to player Skip to player
</Link> </Link>
) : (
<Link href="#offline-message" className={styles.skipLink}>
Skip to offline message
</Link>
)} )}
<Link href="#skip-to-content" className={styles.skipLink}> <Link href="#skip-to-content" className={styles.skipLink}>
Skip to page content Skip to page content