Skip to content

Commit

Permalink
updates for WV-505 tab flow order
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwardmook committed Sep 10, 2024
1 parent 708ad08 commit 0d4aba5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
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 0d4aba5

Please sign in to comment.