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

feat: better screen reader text #790

Merged
merged 9 commits into from
Jan 29, 2024
37 changes: 34 additions & 3 deletions src/components/pages/landingpage/customers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,50 @@ const CustomerLogo = ({
);
};

// This is a visually hidden list of customers for screen readers
const AriaCustomerLogo = () => {
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
return (
<ul
style={{
position: 'absolute',
width: '1px',
height: '1px',
padding: '0',
margin: '-1px',
overflow: 'hidden',
clip: 'rect(0, 0, 0, 0)',
whiteSpace: 'nowrap',
border: '0',
listStyleType: 'none',
}}
aria-label={'Our Customers:'}
>
<li>Allianz</li>
<li>Rosenbauer</li>
<li>Media Markt</li>
<li>Saturn</li>
<li>Green City</li>
<li>FC Bayern</li>
<li>Zeiss</li>
<li>A.D.A.C</li>
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
</ul>
);
};

export const Customers = () => {
return (
<LogosContainer>
<LogoLine>
<AriaCustomerLogo />
virus-rpi marked this conversation as resolved.
Show resolved Hide resolved
<LogoLine aria-hidden={true}>
<CustomerLogo desktopWidth={330} mobileWidth={127} show="allianz" />
<CustomerLogo desktopWidth={451} mobileWidth={176} show="rosenbauer" />
</LogoLine>
<LogoLine>
<LogoLine aria-hidden={true}>
<CustomerLogo desktopWidth={403} mobileWidth={170} show="mediamarkt" />
<CustomerLogo desktopWidth={285} mobileWidth={121} show="saturn" />
<CustomerLogo desktopWidth={337} mobileWidth={156} show="greencity" />
</LogoLine>
<LogoLine>
<LogoLine aria-hidden={true}>
<CustomerLogo desktopWidth={112} mobileWidth={48} show="fcbayern" />
<CustomerLogo desktopWidth={92} mobileWidth={39} show="zeiss" />
<CustomerLogo desktopWidth={324} mobileWidth={138} show="adac" />
Expand Down