diff --git a/packages/ui/index.html b/packages/ui/index.html index a7fab69..bf52f30 100644 --- a/packages/ui/index.html +++ b/packages/ui/index.html @@ -8,7 +8,7 @@ content="Maps providing real-time arrival and departure times of vehicles for bus stops along routes in San Francisco Muni CIS, Toronto Transit Commission, OmniTrans and other transit agencies across North and South America." /> <meta name="viewport" - content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> + content="width=device-width, initial-scale=1.0, maximum-scale=2.0" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link diff --git a/packages/ui/src/components/navigation.tsx b/packages/ui/src/components/navigation.tsx index 9cabb49..f9bf031 100644 --- a/packages/ui/src/components/navigation.tsx +++ b/packages/ui/src/components/navigation.tsx @@ -286,6 +286,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Busmap"> <button data-name="busmap" + aria-label="Busmap Logo" onClick={onClickNavItem} className={page === 'busmap' ? 'active' : undefined}> <span dangerouslySetInnerHTML={{ __html: logoSvg }} /> @@ -300,6 +301,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Nearby"> <button data-name="locate" + aria-label="Nearby" onClick={onClickNavItem} className={page === 'locate' ? 'active' : undefined}> <MapPin /> @@ -309,6 +311,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Selector"> <button data-name="select" + aria-label="Selector" onClick={onClickNavItem} className={page === 'select' ? 'active' : undefined}> <Bus /> @@ -318,6 +321,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Favorites"> <button data-name="favorites" + aria-label="Favorites" onClick={onClickNavItem} className={page === 'favorites' ? 'active' : undefined}> <Star /> @@ -327,6 +331,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Settings"> <button data-name="settings" + aria-label="Settings" onClick={onClickNavItem} className={page === 'settings' ? 'active' : undefined}> <Cog /> @@ -336,6 +341,7 @@ const Navigation: FC<NavigationProps> = ({ status }) => { <li title="Profile"> <button data-name="profile" + aria-label="Profile" onClick={onClickNavItem} className={page === 'profile' ? 'active' : undefined}> <UserIcon /> @@ -343,7 +349,10 @@ const Navigation: FC<NavigationProps> = ({ status }) => { </button> </li> <li> - <button onClick={onClickToggle} className={!collapsed ? 'active' : undefined}> + <button + onClick={onClickToggle} + className={!collapsed ? 'active' : undefined} + aria-label="Toggle flyout menu"> <Exchange /> <span>{collapsed ? 'Open' : 'Close'}</span> </button> diff --git a/packages/ui/src/home.tsx b/packages/ui/src/home.tsx index e89d651..5258006 100644 --- a/packages/ui/src/home.tsx +++ b/packages/ui/src/home.tsx @@ -151,8 +151,8 @@ const Home: FC = () => { const refCurrent = ref.current if (refCurrent) { - refCurrent.addEventListener('touchstart', handleTouchStart) - refCurrent.addEventListener('touchend', handleTouchEnd) + refCurrent.addEventListener('touchstart', handleTouchStart, { passive: true }) + refCurrent.addEventListener('touchend', handleTouchEnd, { passive: true }) } return () => { diff --git a/packages/web/templates/default.conf.template b/packages/web/templates/default.conf.template index 41c9763..5f58b5f 100644 --- a/packages/web/templates/default.conf.template +++ b/packages/web/templates/default.conf.template @@ -39,13 +39,13 @@ server { location ~* \.(js|css)$ { include /etc/nginx/conf.d/core/headers.conf; - add_header Cache-Control "max-age=604800 must-revalidate"; + add_header Cache-Control "max-age=604800, must-revalidate"; } # Do not cache index.html for SPA location ~* ^.+.html$ { include /etc/nginx/conf.d/core/headers.conf; - add_header Cache-Control "no-store max-age=0"; + add_header Cache-Control "no-store, max-age=0"; } access_log /var/log/nginx/core.log core; diff --git a/packages/web/templates/deploy.conf.template b/packages/web/templates/deploy.conf.template index 0e47d5c..7243140 100644 --- a/packages/web/templates/deploy.conf.template +++ b/packages/web/templates/deploy.conf.template @@ -26,13 +26,13 @@ server { location ~* \.(js|css)$ { include /etc/nginx/conf.d/core/headers.conf; - add_header Cache-Control "max-age=604800 must-revalidate"; + add_header Cache-Control "max-age=604800, must-revalidate"; } # Do not cache index.html for SPA location ~* ^.+.html$ { include /etc/nginx/conf.d/core/headers.conf; - add_header Cache-Control "no-store max-age=0"; + add_header Cache-Control "no-store, max-age=0"; } access_log /var/log/nginx/core.log core;