Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: blog page accessibility problems #791

Merged
merged 9 commits into from
Jan 30, 2024
Merged
2 changes: 1 addition & 1 deletion src/components/layout/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const theme: DefaultTheme = {
defaultDark: '#FFFFFF',
secondary: 'rgba(32,40,64,0.5)',
topline: '#3E61EE',
timestamp: 'rgba(0, 0, 0, 0.5)',
timestamp: 'rgba(0, 0, 0, 0.65)',
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
errorMessage: '#FF0D35',
header: {
default: '#FFFFFF',
Expand Down
8 changes: 4 additions & 4 deletions src/components/pages/blog-post/follow-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const FollowPanelContainer = styled.div`
font-size: 16px;

${up('md')} {
margin-top: 0px;
margin-top: 0;
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
min-width: 240px;
}
`;
Expand All @@ -31,7 +31,7 @@ export const PanelText = styled.p`
color: ${({ theme }) => theme.palette.text.default};
`;

const SocialLinks = styled.ul`
const SocialLinks = styled.div`
all: unset;
order: 2;
color: ${({ theme }) => theme.palette.text.link.default};
Expand Down Expand Up @@ -64,10 +64,10 @@ export const FollowPanel = ({ className }: FollowProps) => {

return (
<FollowPanelContainer className={className}>
<PanelText>{t('blog.follow')}</PanelText>
<PanelText aria-hidden={true}>{t('blog.follow')}</PanelText>
<SocialLinks>
<SocialLinkItem data-testid="rss-feed">
<Link to={rssUrl}>
<Link to={rssUrl} aria-label={t('blog.follow')}>
<Icon show="rss" />
</Link>
</SocialLinkItem>
Expand Down
9 changes: 6 additions & 3 deletions src/components/ui/pagination/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const StyledLink = styled.a<{ $disabled: boolean }>`
$disabled &&
css`
opacity: 50%;
cursor: default;
cursor: not-allowed;
pointer-events: none;
`}

&:hover {
Expand Down Expand Up @@ -83,7 +84,8 @@ export const Pagination = ({
<StyledLink
onClick={onPreviousClick}
$disabled={currentPage === 1}
aria-label="Next Page"
aria-label="Previous Page"
tabIndex={currentPage === 1 ? -1 : 0}
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
>
<Icon show={'arrow_left'} />
</StyledLink>
Expand All @@ -101,7 +103,8 @@ export const Pagination = ({
<StyledLink
onClick={onNextClick}
$disabled={currentPage === amountOfPages}
aria-label="Previous Page"
aria-label="Next Page"
tabIndex={currentPage === amountOfPages ? -1 : 0}
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
>
<Icon show={'arrow_right'} />
</StyledLink>
Expand Down
1 change: 1 addition & 0 deletions src/templates/blog-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const Head = ({
const { author, seoMetaText, title, publicationDate, heroImage } =
data.contentfulBlogPost;


const shareImagePath = heroImage.shareImage?.resize.src;

/*
Expand Down
Loading