Skip to content

Commit

Permalink
Merge pull request #34 from stevescruz/fix/accessibility-outline-buttons
Browse files Browse the repository at this point in the history
Fix: Focus accessibility issue for CategoryListItem component's Anchor
  • Loading branch information
ramos-ph authored Jul 13, 2021
2 parents 96a5874 + f1a4182 commit beb973b
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions frontend/src/components/CategoryListItem/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ export const Anchor = styled(Link)`
export const Card = styled.div`
width: 300px;
height: 300px;
background-color: var(--secondary);
border-radius: 20px;
background-color: var(--gray);
border-radius: 10px;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: 0.25s;
${media.lessThan('medium')`
height: 8em;
width: 20em;
`}
transition: background-color 0.25s;
&:hover {
background-color: var(--dark-hover);
Expand All @@ -45,4 +51,19 @@ export const Title = styled.h2`
`}
`;

export const Anchor = styled(Link)`
color: transparent;
text-decoration: none;
margin: 50px;
display: inline-block;
${media.lessThan('medium')`
margin: 1.4em;
`}
transition: outline-color 0.25s;
&:focus {
outline: 1px solid var(--white);
}
`;

0 comments on commit beb973b

Please sign in to comment.