www: improve accessbility (#1507)
This commit is contained in:
@@ -142,20 +142,21 @@ const Carousel = (props: CarouselProps) => {
|
||||
};
|
||||
|
||||
const DotsNavigation = () => (
|
||||
<div
|
||||
class={"slide_nav z-30 w-full absolute bottom-0 flex justify-center cursor-pointer"}
|
||||
>
|
||||
<div class={"slide_nav z-30 w-full absolute bottom-0 flex justify-center"}>
|
||||
{SLIDE_DATA.map((_item, idx) => {
|
||||
return (
|
||||
<div
|
||||
<button
|
||||
class={`px-1 ${NAVIGATION_COLOR}`}
|
||||
onClick={() => {
|
||||
goToSlide(idx);
|
||||
}}
|
||||
key={idx}
|
||||
>
|
||||
{idx === currentSlide.value ? <>●</> : <>○</>}
|
||||
</div>
|
||||
<span class="sr-only">Go to slide {idx}</span>
|
||||
{idx === currentSlide.value
|
||||
? <span class="not-sr-only">●</span>
|
||||
: <span class="not-sr-only">○</span>}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
@@ -169,16 +170,22 @@ const Carousel = (props: CarouselProps) => {
|
||||
}`}
|
||||
tabIndex={0}
|
||||
>
|
||||
<IconCircleChevronsLeft
|
||||
<button
|
||||
class={`left-0 ${CHEVRON_STYLE}`}
|
||||
style="top: calc(50% - 20px)"
|
||||
onClick={() => chevronClick(previousSlide)}
|
||||
/>
|
||||
<IconCircleChevronsRight
|
||||
>
|
||||
<IconCircleChevronsLeft class="w-10 h-10" aria-hidden="true" />
|
||||
<span class="sr-only">Previous slide</span>
|
||||
</button>
|
||||
<button
|
||||
class={`right-0 ${CHEVRON_STYLE}`}
|
||||
style="top: calc(50% - 20px)"
|
||||
onClick={() => chevronClick(nextSlide)}
|
||||
/>
|
||||
>
|
||||
<IconCircleChevronsRight class="w-10 h-10" aria-hidden="true" />
|
||||
<span class="sr-only">Next slide</span>
|
||||
</button>
|
||||
{SLIDE_DATA.map((item, idx) => (
|
||||
<Slide
|
||||
data={item}
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function Features() {
|
||||
return (
|
||||
<div class="flex-1 space-y-2">
|
||||
<div class="bg-blue-600 inline-block p-3 rounded-xl text-white">
|
||||
<item.icon class="w-10 h-10" />
|
||||
<item.icon class="w-10 h-10" aria-hidden="true" />
|
||||
</div>
|
||||
<p class="text-xl">
|
||||
{item.description}
|
||||
@@ -38,9 +38,12 @@ export default function Features() {
|
||||
{item.link &&
|
||||
(
|
||||
<a class="block" href={item.link}>
|
||||
<p class="text-blue-500 cursor-pointer hover:underline inline-flex items-center group">
|
||||
<p class="text-blue-600 cursor-pointer hover:underline inline-flex items-center group">
|
||||
Read More{" "}
|
||||
<IconChevronRight class="inline-block w-5 h-5 transition group-hover:translate-x-0.5" />
|
||||
<IconChevronRight
|
||||
class="inline-block w-5 h-5 transition group-hover:translate-x-0.5"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</p>
|
||||
</a>
|
||||
)}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function Footer({ children }: Props) {
|
||||
<div class="bg-white flex flex-col md:flex-row w-full max-w-screen-lg gap-8 md:gap-16 px-8 py-8 text-sm">
|
||||
<div class="flex-1">
|
||||
<div class="flex items-center gap-1">
|
||||
<LemonIcon class="inline-block" />
|
||||
<LemonIcon class="inline-block" aria-hidden="true" />
|
||||
<div class="font-bold text-2xl">
|
||||
Fresh
|
||||
</div>
|
||||
@@ -69,7 +69,7 @@ export default function Footer({ children }: Props) {
|
||||
class="inline-block hover:text-black"
|
||||
aria-label="GitHub"
|
||||
>
|
||||
<BrandGithub />
|
||||
<BrandGithub aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function Header({ active }: Props) {
|
||||
return (
|
||||
<div class="bg-white w-full max-w-screen-lg py-6 px-8 flex flex-col md:flex-row gap-4">
|
||||
<div class="flex items-center flex-1">
|
||||
<LemonIcon />
|
||||
<LemonIcon aria-hidden="true" />
|
||||
<div class="text-2xl ml-1 font-bold">
|
||||
Fresh
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Hero() {
|
||||
<div class="flex flex-col md:flex-row items-center">
|
||||
<a
|
||||
href="#"
|
||||
class="block mt-4 text-blue-500 cursor-pointer inline-flex items-center group text-blue-800 bg-white px-8 py-2 rounded-md hover:bg-blue-50 font-bold"
|
||||
class="block mt-4 text-blue-600 cursor-pointer inline-flex items-center group text-blue-800 bg-white px-8 py-2 rounded-md hover:bg-blue-50 font-bold"
|
||||
>
|
||||
Sign Up{" "}
|
||||
</a>
|
||||
@@ -26,7 +26,10 @@ export default function Hero() {
|
||||
class="block mt-4 transition-colors text-blue-400 cursor-pointer inline-flex items-center group px-4 py-2 hover:text-blue-100"
|
||||
>
|
||||
Documentation{" "}
|
||||
<IconChevronRight class="inline-block w-5 h-5 transition group-hover:translate-x-0.5" />
|
||||
<IconChevronRight
|
||||
class="inline-block w-5 h-5 transition group-hover:translate-x-0.5"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user