Skip to content

Commit

Permalink
Merge pull request #2584 from bcgov/bugfix/DESENG-687-fix-engagement-…
Browse files Browse the repository at this point in the history
…authoring-focus-trap

[To Main] DESENG-687: Bugfix - Fix keyboard focus being trapped on buttons on authoring page
yay yippee ^w^
  • Loading branch information
NatSquared authored Sep 3, 2024
2 parents f8bd855 + 430808f commit 69524c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## August 28, 2024

- **Bugfix** Fix keyboard focus being trapped on buttons on authoring page [🎟️ DESENG-687](https://citz-gdx.atlassian.net/browse/DESENG-687)

## August 27, 2024

- **Task** Upgrade to Node v20 [🎟️ DESENG-682](https://citz-gdx.atlassian.net/browse/DESENG-682)
Expand Down
25 changes: 12 additions & 13 deletions met-web/src/components/engagement/admin/view/AuthoringTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { faArrowRightLong } from '@fortawesome/pro-light-svg-icons';
import { faCheck } from '@fortawesome/pro-solid-svg-icons';
import { MetLabel, MetHeader3 } from 'components/common';
import { SystemMessage } from 'components/common/Layout/SystemMessage';
import { When } from 'react-if';
import { Grid, Link } from '@mui/material';
import { Unless, When } from 'react-if';
import { Grid } from '@mui/material';
import { colors } from 'styles/Theme';
import { Link } from 'components/common/Navigation';

const StatusCircle = (props: StatusCircleProps) => {
const statusCircleStyles = {
Expand Down Expand Up @@ -52,17 +53,15 @@ const AuthoringButton = (props: AuthoringButtonProps) => {
paddingRight: '0.4rem',
};
return (
<Link style={{ textDecoration: 'none' }} href={props.item.link}>
<button style={buttonStyles}>
<When condition={props.item.completed}>
<FontAwesomeIcon style={checkStyles} icon={faCheck} />
</When>
<span style={textStyles}>{props.item.title}</span>
<When condition={!props.item.completed}>
<StatusCircle required={props.item.required} />
</When>
<FontAwesomeIcon style={arrowStyles} icon={faArrowRightLong} />
</button>
<Link underline="none" style={{ ...buttonStyles }} to={props.item.link}>
<When condition={props.item.completed}>
<FontAwesomeIcon style={checkStyles} icon={faCheck} />
</When>
<span style={textStyles}>{props.item.title}</span>
<Unless condition={props.item.completed}>
<StatusCircle required={props.item.required} />
</Unless>
<FontAwesomeIcon style={arrowStyles} icon={faArrowRightLong} />
</Link>
);
};
Expand Down

0 comments on commit 69524c5

Please sign in to comment.