Skip to content

Commit

Permalink
Merge pull request #4019 from jedwardmook/WV-505
Browse files Browse the repository at this point in the history
[TEAM REVIEW] WV 505 On the Ready Page, Update Tab order (UI Accessibility) - John Mook
  • Loading branch information
DaleMcGrew authored Sep 12, 2024
2 parents 80a64bd + 6949dd4 commit e1d38aa
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 36 deletions.
37 changes: 17 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@loadable/component": "^5.16.4",
"@mui/icons-material": "^5.15.20",
"@mui/icons-material": "^5.16.0",
"@mui/lab": "^5.0.0-alpha.96",
"@mui/material": "^5.15.20",
"@mui/material": "^5.16.0",
"@mui/styled-engine-sc": "^5.10.1",
"@mui/styles": "^5.15.20",
"@mui/styles": "^5.16.0",
"@openreplay/tracker": "^8.1.1",
"@storybook/addon-actions": "^7.6.20",
"@stripe/react-stripe-js": "^1.3.0",
Expand Down
5 changes: 4 additions & 1 deletion src/js/components/Ballot/BallotElectionListWithFilters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,12 @@ const ElectionState = styled('div')`
margin: 0 2px;
`;

const SimpleModeItemWrapper = styled('div')`
const SimpleModeItemWrapper = styled('button')`
cursor: pointer;
margin-top: 12px;
padding: 0;
background: transparent;
border: none;
`;

const PriorOrUpcomingElectionsWrapper = styled('div')`
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/Navigation/FooterMainWeVote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class FooterMainWeVote extends Component {
<TopSectionOuterWrapper>
<TopSectionInnerWrapper>
<OneRow>
<div id="footerLinkHowItWorks" className={classes.onClickDiv} onClick={this.openHowItWorksModal}>How It Works</div>
<button type="button" style={{ border: 'none', backgroundColor: 'transparent', padding: '0' }} id="footerLinkHowItWorks" className={classes.onClickDiv} onClick={this.openHowItWorksModal}>How It Works</button>
<RowSpacer />
<OpenExternalWebSite
linkIdAttribute="footerLinkWeVoteHelp"
Expand Down
6 changes: 5 additions & 1 deletion src/js/components/Ready/ReadyFinePrint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ReadyFinePrint extends Component {
this.state = {
contentUnfurled: false,
};
this.firstListItemRef = React.createRef();
}

componentDidMount () {
Expand All @@ -42,6 +43,9 @@ class ReadyFinePrint extends Component {
this.setState({
contentUnfurled: !contentUnfurled,
});
if (!contentUnfurled) {
this.firstListItemRef.current.focus();
}
}

render () {
Expand All @@ -51,7 +55,7 @@ class ReadyFinePrint extends Component {
return (
<OuterWrapper>
<InnerWrapper>
<IntroHeader titleCentered={titleCentered} titleLarge={titleLarge}>
<IntroHeader titleCentered={titleCentered} titleLarge={titleLarge} tabIndex={0} ref={this.firstListItemRef}>
The fine print:
</IntroHeader>
<ListWrapper>
Expand Down
12 changes: 8 additions & 4 deletions src/js/components/Ready/ReadyIntroduction.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ReadyIntroduction extends Component {
this.state = {
contentUnfurled: false,
};
this.firstListItemRef = React.createRef();
}

componentDidMount () {
Expand Down Expand Up @@ -65,6 +66,9 @@ class ReadyIntroduction extends Component {
this.setState({
contentUnfurled: !contentUnfurled,
});
if (!contentUnfurled) {
this.firstListItemRef.current.focus();
}
}

showSelectBallotModalEditAddress = () => {
Expand All @@ -91,7 +95,7 @@ class ReadyIntroduction extends Component {
return (
<OuterWrapper>
<InnerWrapper>
<IntroHeader titleCentered={titleCentered} titleLarge={titleLarge}>
<IntroHeader titleCentered={titleCentered} titleLarge={titleLarge} tabIndex={0} ref={this.firstListItemRef}>
WeVote helps you:
</IntroHeader>
<ListWrapper>
Expand All @@ -104,9 +108,9 @@ class ReadyIntroduction extends Component {
<ListRow>
<Dot><StepNumberPlaceholder>&nbsp;</StepNumberPlaceholder></Dot>
<StepText id="readyIntroductionStepText1">
<span className="u-link-color u-link-color-on-hover u-cursor--pointer" onClick={this.showSelectBallotModalEditAddress}>
Enter your address
</span>
<button style={{ backgroundColor: 'transparent', border: 'none', padding: '0' }} onClick={this.showSelectBallotModalEditAddress} type="button">
<span className="u-link-color u-link-color-on-hover u-link-underline-on-hover">Enter your address</span>
</button>
{' '}
to find out when your next election is, and
{' '}
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/Widgets/ShowMoreButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const styles = (theme) => ({
},
});

const ShowMoreButtonsStyled = styled('div')(({ theme }) => (`
const ShowMoreButtonsStyled = styled('button')(({ theme }) => (`
border: 0 !important;
color: #0858A1;
cursor: pointer;
Expand Down
10 changes: 5 additions & 5 deletions src/js/pages/Ready.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,6 @@ class Ready extends Component {
</DelayedLoad>
</Suspense>
)}
{nextReleaseFeaturesEnabled && (
<ReadyTaskPlan
arrowsOn
/>
)}
</div>
<div className="col-lg-4 d-none d-lg-block">
{(chosenReadyIntroductionTitle || chosenReadyIntroductionText) && (
Expand All @@ -293,6 +288,11 @@ class Ready extends Component {
</ReadyIntroductionDesktopWrapper>
{/* nextReleaseFeaturesEnabled && <PledgeToVote /> */}
</div>
{nextReleaseFeaturesEnabled && (
<ReadyTaskPlan
arrowsOn
/>
)}
</div>
</ReadyPageContainer>
</PageContentContainer>
Expand Down

0 comments on commit e1d38aa

Please sign in to comment.