File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
views/Home/components/GuestWelcome Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,28 @@ const useTabHighlight = () => {
5757 return tabIndex ;
5858} ;
5959
60+ const useAltText = ( ) => {
61+ const location = useLocation ( ) ;
62+ const [ altText , setAltText ] = useState ( '' ) ;
63+
64+ useEffect ( ( ) => {
65+ if ( location . pathname === '/' ) {
66+ setAltText ( 'Gordon 360 Logo - Home page' ) ;
67+ } else {
68+ setAltText ( 'Gordon 360 Logo - Go to home' ) ;
69+ }
70+ } , [ location ] ) ;
71+
72+ return altText ;
73+ } ;
74+
6075const GordonHeader = ( { onDrawerToggle } ) => {
6176 const navigate = useNavigate ( ) ;
6277 const [ dialog , setDialog ] = useState ( '' ) ;
6378 const isOnline = useNetworkStatus ( ) ;
6479 const isAuthenticated = useIsAuthenticated ( ) ;
6580 const tabIndex = useTabHighlight ( ) ;
81+ const altText = useAltText ( ) ;
6682
6783 const handleOpenProfile = ( ) => {
6884 navigate ( '/myprofile' ) ;
@@ -148,7 +164,7 @@ const GordonHeader = ({ onDrawerToggle }) => {
148164 < source srcSet = { headerLogo72dpi } media = "(min-width: 900px)" />
149165 < source srcSet = { headerLogo64dpi } media = "(min-width: 600px)" />
150166 < source srcSet = { headerLogo56dpiNoText } media = "(max-width: 375px)" />
151- < img src = { headerLogo56dpi } alt = "Gordon 360 Logo" > </ img >
167+ < img src = { headerLogo56dpi } alt = { altText } > </ img >
152168 </ picture >
153169 </ Link >
154170 </ div >
Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ const GuestWelcome = () => {
7474 < Grid container style = { { textAlign : 'center' } } >
7575 < Card raised className = { styles . gw_card } >
7676 < CardHeader title = "Welcome to Gordon 360!" />
77- < CardMedia image = { GordonLogoVerticalWhite } component = "img" />
77+ < CardMedia
78+ image = { GordonLogoVerticalWhite }
79+ component = "img"
80+ alt = "Welcome to Gordon 360"
81+ />
7882 < CardContent >
7983 < Typography >
8084 As a guest, you have access to a limited view of the site. Login for full access.
You can’t perform that action at this time.
0 commit comments