Skip to content

Commit

Permalink
Try blinking the footer when page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyEJohnson committed Sep 17, 2024
1 parent c8154b0 commit b3ad020
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2,837 deletions.
20 changes: 19 additions & 1 deletion src/app/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import RiceWhiteLogo from '../../../assets/rice-white-text.png';
import htmlMessage from '../../components/htmlMessage';
import { connect } from 'react-redux';
import { AppState } from '../../types';
import * as select from '../../content/selectors';
import { isVerticalNavOpenConnector } from '../../content/components/utils/sidebar';
import { State } from '../../content/types';
import * as Styled from './styled';
Expand Down Expand Up @@ -209,4 +212,19 @@ const Footer = ({
</Styled.FooterWrapper>
);

export default isVerticalNavOpenConnector(Footer);
// tslint:disable-next-line:variable-name
const VcFooter = isVerticalNavOpenConnector(Footer);

// Weirdness: When navigating to a new page, JAWS starts to read the footer.
// This hides the footer while pageId is changing
function PidFooter({page}: {page?: {id: string}}) {
const pageId = page ? page.id : null;

return pageId ? <VcFooter /> : null;
}

export default connect(
(state: AppState) => ({
page: select.page(state),
})
)(PidFooter);
Loading

0 comments on commit b3ad020

Please sign in to comment.