Skip to content

Commit

Permalink
Merge pull request #1815 from bcgov/fix/kevin--1709
Browse files Browse the repository at this point in the history
fix: cypress accessibility issues
  • Loading branch information
kevin-hashimoto authored Jan 28, 2025
2 parents 492e910 + c5e76e7 commit 64f775d
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 19 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/BCNavbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function BCNavbar({
}}
color="inherit"
elevation={0}
aria-label="main navigation"
>
<HeaderBar
data={{ title, routes, beta, headerRightPart, menuRightPart }}
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/BCWidgetCard/BCWidgetCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ function BCWidgetCard({
mx={2}
mt={-3}
>
<BCTypography variant="subtitle2" fontWeight="light" color="inherit">
<BCTypography
variant="subtitle2"
fontWeight="light"
color="inherit"
component="h2"
>
{title}
</BCTypography>
{editButton && (
Expand Down
1 change: 0 additions & 1 deletion frontend/src/layouts/MainLayout/MainLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const MainLayout = () => {
</BCTypography>
<Navbar />
<Container
component="main"
maxWidth="lg"
sx={{
padding: '1rem',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const FeedbackCard = () => {
alignItems="center"
justifyContent="center"
>
<Icon sx={{ color: '#578260', fontSize: 60 }}>
<Icon sx={{ color: '#547D59', fontSize: 60 }}>
<MailIcon />
</Icon>
<BCTypography
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const OrgBalanceCard = () => {
{t('dashboard:orgBalance.hasABalanceOf')}
</BCTypography>
<BCTypography
style={{ fontSize: '32px', color: '#578260', marginBottom: '-4px' }}
style={{ fontSize: '32px', color: '#547D59', marginBottom: '-4px' }}
component="span"
>
{orgBalance.totalBalance.toLocaleString()}
Expand All @@ -63,7 +63,7 @@ const OrgBalanceCard = () => {
</BCTypography>
<Box display="flex" alignItems="center" mt={1}>
<BCTypography
style={{ fontSize: '22px', color: '#578260' }}
style={{ fontSize: '22px', color: '#547D59' }}
component="span"
>
({formattedReservedBalance} {t('dashboard:orgBalance.inReserve')})
Expand All @@ -73,7 +73,7 @@ const OrgBalanceCard = () => {
TransitionComponent={Fade}
arrow
>
<InfoIcon style={{ marginLeft: '4px', color: '#578260' }} />
<InfoIcon style={{ marginLeft: '4px', color: '#547D59' }} />
</Tooltip>
</Box>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const OrgDetailsCard = () => {
>
<BCTypography
variant="subtitle2"
component="p"
color="link"
sx={{
textDecoration: 'underline',
Expand All @@ -89,7 +90,7 @@ const OrgDetailsCard = () => {
{t('dashboard:orgDetails.createNewUsrLabel')}
<FontAwesomeIcon
icon={faShareFromSquare}
style={{ color: '#578260', marginLeft: 6 }}
style={{ color: '#547D59', marginLeft: 6 }}
/>
</BCTypography>
</ListItemButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const OrgTransactionsCard = () => {
<FontAwesomeIcon
key={index}
icon={icon}
style={{ color: '#578260', marginLeft: 6 }}
style={{ color: '#547D59', marginLeft: 6 }}
/>
))}
</BCTypography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const linkStyle = {

const UserSettingsLink = ({ onClick, children }) => (
<ListItemButton onClick={onClick}>
<Typography variant="subtitle2" sx={linkStyle}>
<Typography variant="subtitle2" sx={linkStyle} component="p">
{children}
</Typography>
</ListItemButton>
Expand Down Expand Up @@ -65,7 +65,7 @@ const OrgUserSettingsCard = () => {
{t('dashboard:orgUserSettings.help')}
<FontAwesomeIcon
icon={faArrowUpRightFromSquare}
style={{ color: '#578260', marginLeft: 6 }}
style={{ color: '#547D59', marginLeft: 6 }}
/>
</UserSettingsLink>
</List>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const WebsiteCard = () => {
icon={faShareFromSquare}
style={{
marginLeft: '6px',
color: '#578260'
color: '#547D59'
}}
/>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const AdminLinksCard = () => {
>
<BCTypography
variant="subtitle2"
component="p"
color="link"
sx={{
textDecoration: 'underline',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const OrganizationsSummaryCard = () => {
{selectedOrganization.name}
</BCTypography>
<BCTypography
style={{ fontSize: '32px', color: '#578260', marginBottom: '-2px' }}
style={{ fontSize: '32px', color: '#547D59', marginBottom: '-2px' }}
component="span"
>
{numberFormatter(selectedOrganization.totalBalance)}
Expand All @@ -95,7 +95,7 @@ const OrganizationsSummaryCard = () => {
</BCTypography>
<Box display="flex" alignItems="center" mt={1}>
<BCTypography
style={{ fontSize: '22px', color: '#578260' }}
style={{ fontSize: '22px', color: '#547D59' }}
component="span"
>
({numberFormatter(selectedOrganization.reservedBalance)} in
Expand All @@ -119,6 +119,7 @@ const OrganizationsSummaryCard = () => {
}}
variant="outlined"
onChange={onSelectOrganization}
inputProps={{ 'aria-label': 'Select an organization' }}
>
<MenuItem key="default" value={t('txn:allOrganizations')}>
{t('txn:allOrganizations')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const linkStyle = {

const UserSettingsLink = ({ onClick, children }) => (
<ListItemButton onClick={onClick}>
<Typography variant="subtitle2" sx={linkStyle}>
<Typography variant="subtitle2" sx={linkStyle} component="p">
{children}
</Typography>
</ListItemButton>
Expand Down Expand Up @@ -65,7 +65,7 @@ const UserSettingsCard = () => {
{t('dashboard:userSettings.help')}
<FontAwesomeIcon
icon={faArrowUpRightFromSquare}
style={{ color: '#578260', marginLeft: 6 }}
style={{ color: '#547D59', marginLeft: 6 }}
/>
</UserSettingsLink>
</List>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const NotificationSettingsForm = ({
}}
>
<MailIcon
sx={{ color: '#578260', width: '22px', height: '22px' }}
sx={{ color: '#547D59', width: '22px', height: '22px' }}
/>
<BCTypography variant="body2" sx={{ color: 'text.primary' }}>
{t('emailNotification')}
Expand All @@ -234,7 +234,7 @@ const NotificationSettingsForm = ({
}}
>
<NotificationsIcon
sx={{ color: '#578260', width: '22px', height: '22px' }}
sx={{ color: '#547D59', width: '22px', height: '22px' }}
/>
<BCTypography variant="body2" sx={{ color: 'text.primary' }}>
{t('inAppNotification')}
Expand Down Expand Up @@ -263,7 +263,7 @@ const NotificationSettingsForm = ({
>
<MailIcon
style={{
color: '#578260',
color: '#547D59',
width: '22px',
height: '22px'
}}
Expand All @@ -280,7 +280,7 @@ const NotificationSettingsForm = ({
>
<NotificationsIcon
style={{
color: '#578260',
color: '#547D59',
width: '22px',
height: '22px'
}}
Expand Down

0 comments on commit 64f775d

Please sign in to comment.