Skip to content

Commit 9d525b9

Browse files
author
llalunio
committed
fix(a11y): fixed color contrast and heading issues
1 parent 9000e6e commit 9d525b9

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/components/Layout/Sidebar/SidebarLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function SidebarLink({
6666
'text-primary dark:text-primary-dark': level === 0 && !selected,
6767
'text-base text-secondary dark:text-secondary-dark':
6868
level > 0 && !selected,
69-
'text-base text-link dark:text-link-dark bg-highlight dark:bg-highlight-dark border-blue-40 hover:bg-highlight hover:text-link dark:hover:bg-highlight-dark dark:hover:text-link-dark':
69+
'text-base text-primary dark:text-link-dark bg-highlight dark:bg-highlight-dark border-blue-40 hover:bg-highlight hover:text-link dark:hover:bg-highlight-dark dark:hover:text-link-dark':
7070
selected,
7171
'dark:bg-gray-70 bg-gray-3 dark:hover:bg-gray-70 hover:bg-gray-3':
7272
isPending,

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function NavItem({url, isActive, children}: any) {
129129
'active:scale-95 transition-transform w-full text-center outline-link py-1.5 px-1.5 xs:px-3 sm:px-4 rounded-full capitalize whitespace-nowrap',
130130
!isActive && 'hover:bg-primary/5 hover:dark:bg-primary-dark/5',
131131
isActive &&
132-
'bg-highlight dark:bg-highlight-dark text-link dark:text-link-dark'
132+
'bg-highlight dark:bg-highlight-dark text-link-10 dark:text-link-dark'
133133
)}>
134134
{children}
135135
</Link>
@@ -304,7 +304,7 @@ export default function TopNav({
304304
<button
305305
type="button"
306306
className={cn(
307-
'flex 3xl:w-[56rem] 3xl:mx-0 relative ps-4 pe-1 py-1 h-10 bg-gray-30/20 dark:bg-gray-40/20 outline-none focus:outline-link betterhover:hover:bg-opacity-80 pointer items-center text-start w-full text-gray-30 rounded-full align-middle text-base'
307+
'flex 3xl:w-[56rem] 3xl:mx-0 relative ps-4 pe-1 py-1 h-10 bg-gray-30/20 dark:bg-gray-40/20 outline-none focus:outline-link betterhover:hover:bg-opacity-80 pointer items-center text-start w-full rounded-full align-middle text-base'
308308
)}
309309
onClick={onOpenSearch}>
310310
<IconSearch className="align-middle me-3 text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />

src/components/MDX/Diagram.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface DiagramProps {
1616
function Caption({text}: {text: string}) {
1717
return (
1818
<div className="w-full flex justify-center">
19-
<figcaption className="p-1 sm:p-2 mt-0 sm:mt-0 text-gray-40 text-base lg:text-lg text-center leading-tight table-caption max-w-lg">
19+
<figcaption className="p-1 sm:p-2 mt-0 sm:mt-0 text-base lg:text-lg text-center leading-tight table-caption max-w-lg">
2020
{text}
2121
</figcaption>
2222
</div>

src/components/MDX/InlineCode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function InlineCode({
1818
className={cn(
1919
'inline text-code text-secondary dark:text-secondary-dark px-1 rounded-md no-underline',
2020
{
21-
'bg-gray-30 bg-opacity-10 py-px': !isLink,
21+
'bg-opacity-10 py-px': !isLink,
2222
'bg-highlight dark:bg-highlight-dark py-0': isLink,
2323
}
2424
)}

src/components/MDX/SimpleCallout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import * as React from 'react';
66
import cn from 'classnames';
7-
import {H3} from './Heading';
7+
import {H2} from './Heading';
88

99
interface SimpleCalloutProps {
1010
title: string;
@@ -18,11 +18,11 @@ function SimpleCallout({title, children, className}: SimpleCalloutProps) {
1818
'p-6 xl:p-8 pb-4 xl:pb-6 bg-card dark:bg-card-dark rounded-2xl shadow-inner-border dark:shadow-inner-border-dark text-base text-secondary dark:text-secondary-dark my-8',
1919
className
2020
)}>
21-
<H3
21+
<H2
2222
className="text-primary dark:text-primary-dark mt-0 mb-3 leading-tight"
2323
isPageAnchor={false}>
2424
{title}
25-
</H3>
25+
</H2>
2626
{children}
2727
</div>
2828
);

src/content/learn/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export default function ShoppingList() {
263263
<li
264264
key={product.id}
265265
style={{
266-
color: product.isFruit ? 'magenta' : 'darkgreen'
266+
color: product.isFruit ? 'darkblue' : 'darkgreen'
267267
}}
268268
>
269269
{product.title}

src/styles/sandpack.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ html .sandpack {
4747

4848
--sp-syntax-color-plain: #24292e;
4949
--sp-syntax-color-comment: #6a737d;
50-
--sp-syntax-color-keyword: #d73a49;
51-
--sp-syntax-color-tag: #22863a;
50+
--sp-syntax-color-keyword: #d21a2d;
51+
--sp-syntax-color-tag: #077e23;
5252
--sp-syntax-color-punctuation: #24292e;
5353
--sp-syntax-color-definition: #6f42c1;
5454
--sp-syntax-color-property: #005cc5;

0 commit comments

Comments
 (0)