Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions components/Nav/MobileNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ const MobileNavbar = props => {
return (
<Wrapper>
{showSideNav !== false && (
<NavButton $active={!isSideFolded} onClick={onSideToggle}>
<NavButton
$active={!isSideFolded}
onClick={onSideToggle}
aria-label={!isSideFolded ? 'Close side menu' : 'Open side menu'}
>
{isSideFolded ? <FoldIcon /> : <CloseIcon />}
</NavButton>
)}
Expand All @@ -98,11 +102,15 @@ const MobileNavbar = props => {
<Logo $compact />
</LogoLink>
<div>
<NavButton onClick={onSearchButtonClick}>
<NavButton aria-label="Search" onClick={onSearchButtonClick}>
<StyledIcon as={Search} size={28} />
</NavButton>

<NavButton onClick={onMobileNavToggle} $active={!isMobileNavFolded}>
<NavButton
onClick={onMobileNavToggle}
$active={!isMobileNavFolded}
aria-label={!isMobileNavFolded ? 'Close Navigation' : 'Open Navigation'}
>
<ArrowWrapper $shouldRotate={!isMobileNavFolded}>
<StyledIcon as={KeyboardArrowDown} size={36} />
</ArrowWrapper>
Expand Down
4 changes: 2 additions & 2 deletions components/Nav/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ModalContainer extends PureComponent {
return (
<>
<AlgoliaModalHeader $isOpen={this.props.isOpen}>
<button onClick={this.onCloseButtonClick}>
<button onClick={this.onCloseButtonClick} aria-label="Close Search Bar">
<StyledModalCloseIcon />
</button>
</AlgoliaModalHeader>
Expand Down Expand Up @@ -172,7 +172,7 @@ class Navbar extends PureComponent {
<Wrapper $transparent={transparent}>
<NormalNavbar>
<StartWrapper>
<LogoLink>
<LogoLink aria-label="Styled Components Home Page">
<Logo />
</LogoLink>
<NavLinks />
Expand Down
2 changes: 1 addition & 1 deletion components/Nav/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const Search = ({ isDocs, className }) => {
return (
<Wrapper className={className}>
<GlobalStyles />
<Button>
<Button aria-label="Search">
<StyledSearchIcon />
</Button>
<Input id={INPUT_ID} placeholder={isDocs ? `Search ...` : `Search docs ...`} ref={searchInput} type="search" />
Expand Down
6 changes: 3 additions & 3 deletions components/Nav/Social.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ const Spectrum = () => (

const Social = props => (
<Wrapper {...props}>
<SocialLink href="https://spectrum.chat/styled-components/">
<SocialLink href="https://spectrum.chat/styled-components/" aria-label="Spectrum Chat">
<Spectrum />
</SocialLink>
{/* <SocialLink href="https://twitter.com/someone">
<Twitter />
</SocialLink> */}
<SocialLink href="https://github.com/styled-components">
<SocialLink href="https://github.com/styled-components" aria-label="GitHub">
<StyledIcon as={Github} height="18" />
</SocialLink>
<SocialLink href="https://medium.com/styled-components">
<SocialLink href="https://medium.com/styled-components" aria-label="Medium.com">
<StyledIcon as={MediumM} height="18" />
</SocialLink>
</Wrapper>
Expand Down
4 changes: 2 additions & 2 deletions components/Slider/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const Navigation = ({ prev, next }) => {
return (
<SlideNav>
<ShowcaseLink item={prev}>
<NavButton>
<NavButton role="button" aria-label="previous image">
<Image
width={1920}
height={1080}
Expand All @@ -123,7 +123,7 @@ const Navigation = ({ prev, next }) => {
</ShowcaseLink>

<ShowcaseLink item={next}>
<NavButton>
<NavButton role="button" aria-label="next image">
<Image
width={1920}
height={1080}
Expand Down
4 changes: 2 additions & 2 deletions components/Slider/ShowcaseBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ const ShowcaseBody = ({ title, owner, description, link, repo }) => (
{description && <p>{description}</p>}
</div>
<SlideMetaLinks>
<SlideMetaLink href={link} target="_blank">
<SlideMetaLink href={link} target="_blank" aria-label={`${title} website`}>
<span>Go to website</span>
<Globe />
</SlideMetaLink>
{repo && (
<SlideMetaLink href={repo} target="_blank">
<SlideMetaLink href={repo} target="_blank" aria-label={`${title} repository`}>
<span>Go to repository</span>
<RepoIcon url={repo} />
</SlideMetaLink>
Expand Down