Skip to content

Commit

Permalink
added code for accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikitita committed Jun 20, 2024
1 parent 7e89f91 commit ba4f6fe
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/components/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Carousel = () => {

return (
<CarouselContainer {...handlers} className="carousel">
{testimonial.map(({ testimonialImage, priceCardImage, id }) => (
{testimonial.map(({ testimonialImage, id }) => (
<Slide key={id} translateValue={translateValue}>
<CarouselTestimonials>
<Image
Expand Down
2 changes: 1 addition & 1 deletion src/components/Contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Contact = () => {
<h1>Not sure what to choose?</h1>
<p>We are happy to help. Let’s chat!</p>
</ContactText>
<Button>Start a chat</Button>
<Button aria-label="Start a chat">Start a chat</Button>
</ContactContent>
</ContactWrapper>
</>
Expand Down
22 changes: 14 additions & 8 deletions src/components/Dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ export const Dropdown = () => {

return (
<SelectContainer>
<DropdownButton onClick={toggleDropdown}>
<DropdownMenu src={menuIcon} alt="Navigation bar menu" open={isOpen} />
<DropdownButton
onClick={toggleDropdown}
aria-haspopup="true"
aria-expanded={isOpen}>
<DropdownMenu src={menuIcon} alt="Navigation bar menu" />
</DropdownButton>

<OptionsContainer open={isOpen}>
<VectorBtn onClick={toggleDropdown}>
<VectorImg src={vector} />
<OptionsContainer open={isOpen} role="menu" aria-label="Options">
<VectorBtn onClick={toggleDropdown} aria-label="Close menu">
<VectorImg src={vector} alt="" />
</VectorBtn>
{options.map((option) => (
<Option key={option.value}>{option.label}</Option>
<Option key={option.value} role="menuitem" tabIndex="0" onClick={toggleDropdown}>
{option.label}
</Option>
))}
</OptionsContainer>
</SelectContainer>
Expand Down Expand Up @@ -93,8 +98,9 @@ const VectorImg = styled.img`
height: 12px;
padding-left: 125px;
padding-top: 6px;
@media (min-width: 1200px){
display: none;}
@media (min-width: 1200px) {
display: none;
}
`;

const Option = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Fonts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createGlobalStyle } from "styled-components";
export const Fonts = () => {
return (
<>
<GlobalFonts></GlobalFonts>
<GlobalFonts/>
</>
)
}
Expand Down
16 changes: 9 additions & 7 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ export const Footer = () => {
Learn, Laugh, and<br></br>Connect on the Slopes!
</h1>
</FooterText>
<FooterList>About us</FooterList>
<FooterList>FAQ</FooterList>
<FooterList>Privacy Policy</FooterList>
<FooterList>Terms and conditions</FooterList>
<nav aria-label="Footer Navigation">
<FooterList href="#about-us">About us</FooterList>
<FooterList href="#faq">FAQ</FooterList>
<FooterList href="#privacy-policy">Privacy Policy</FooterList>
<FooterList href="#terms-and-conditions">Terms and conditions</FooterList>
</nav>
<FollowUs>
<Icons>
<FooterList>Follow us</FooterList>
<IconImage src={facebook} />
<IconImage src={instagram} />
<FooterList href="#follow-us">Follow us</FooterList>
<IconImage src={facebook} alt="Facebook icon"/>
<IconImage src={instagram} alt="Instagram icon"/>
</Icons>
<Language>
<FooterList>EN</FooterList>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderNavbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const HeaderNavbar = () => {
return (
<>
<Navbar>
<NavbarLogo src={navbarLogo} />
<NavbarLogo src={navbarLogo} alt="Company logo" />
<Dropdown />
</Navbar>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OurLessons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const OurLessons = () => {
return (
<>
<OurLessonsWrapper>
<OurLessonsImage></OurLessonsImage>
<OurLessonsImage alt="Snowboarding Lessons" />
<OurLessonContent>
<OurLessonsText>
<h1>Our Lessons</h1>
Expand Down
1 change: 1 addition & 0 deletions src/components/OurOfferings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const OurOfferings = () => {
</>
);
};

const OurOfferingsSection = styled.section`
h1 {
color: #0b1623;
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards-components/Explore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Explore = () => {
return (
<>
<ExploreCard>
<ExploreImage></ExploreImage>
<ExploreImage alt="Image of a map"/>
<ExploreText>
<h2>Explore</h2>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards-components/HaveFun.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const HaveFun = () => {
return (
<>
<HaveFunCard>
<HaveFunImage></HaveFunImage>
<HaveFunImage alt="Image of a microphone"/>
<HaveFunText>
<h2>Have fun</h2>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards-components/Learn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Learn = () => {
return (
<>
<LearnCard>
<LearnImage></LearnImage>
<LearnImage alt="Image of a girl with a snowboard"/>
<LearnText>
<h2>Learn</h2>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards-components/Live.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Live = () => {
return (
<>
<LiveCard>
<LiveImage></LiveImage>
<LiveImage alt="Image of a house for accommodation"/>
<LiveText>
<h2>Live</h2>
<p>Enjoy your stay at our cozy cabin in Laax.</p>
Expand Down

0 comments on commit ba4f6fe

Please sign in to comment.