Skip to content

Commit a7e85ea

Browse files
committed
Fix accessibility: heading hierarchy and color contrast issues
1 parent 40ea071 commit a7e85ea

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/components/Layout/HomeContent.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ export function HomeContent() {
297297
<div className="absolute inset-0 bg-gradient-right" />
298298
<div className="bg-wash relative h-14 w-full" />
299299
<div className="relative flex items-start justify-center flex-col flex-1 pb-16 pt-5 gap-3 px-5 lg:px-10 lg:pt-8">
300-
<h4 className="leading-tight text-primary font-semibold text-3xl lg:text-4xl">
300+
<h3 className="leading-tight text-primary font-semibold text-3xl lg:text-4xl">
301301
Stay true to the web
302-
</h4>
302+
</h3>
303303
<p className="lg:text-xl leading-normal text-secondary">
304304
People expect web app pages to load fast. On the server,
305305
React lets you start streaming HTML while you’re still
@@ -383,9 +383,9 @@ export function HomeContent() {
383383
</div>
384384
</div>
385385
<div className="flex flex-col items-start justify-center pt-0 gap-3 px-2.5 lg:pt-8 lg:px-8">
386-
<h4 className="leading-tight text-primary dark:text-primary-dark font-semibold text-3xl lg:text-4xl">
386+
<h3 className="leading-tight text-primary dark:text-primary-dark font-semibold text-3xl lg:text-4xl">
387387
Go truly native
388-
</h4>
388+
</h3>
389389
<p className="h-full lg:text-xl text-secondary dark:text-secondary-dark leading-normal">
390390
People expect native apps to look and feel like their
391391
platform.{' '}
@@ -1114,9 +1114,9 @@ function SearchableVideoList({ videos }) {
11141114
noPadding={true}
11151115
contentMarginTop="72px"
11161116
height="30rem">
1117-
<h1 className="mx-4 mb-1 font-bold text-3xl text-primary">
1117+
<h2 className="mx-4 mb-1 font-bold text-3xl text-primary">
11181118
React Videos
1119-
</h1>
1119+
</h2>
11201120
<p className="mx-4 mb-0 leading-snug text-secondary text-xl">
11211121
A brief history of React
11221122
</p>
@@ -1315,7 +1315,7 @@ function BrowserChrome({children, hasPulse, hasRefresh, domain, path}) {
13151315
/>
13161316
</svg>
13171317

1318-
<span className="text-gray-30">
1318+
<span className="text-gray-50 dark:text-gray-30">
13191319
{domain}
13201320
{path != null && '/'}
13211321
</span>

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ export default function TopNav({
312312
<button
313313
type="button"
314314
className={cn(
315-
'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'
315+
'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-50 dark:text-gray-30 rounded-full align-middle text-base'
316316
)}
317317
onClick={onOpenSearch}>
318-
<IconSearch className="align-middle me-3 text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
318+
<IconSearch className="align-middle me-3 text-gray-50 dark:text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
319319
Search
320320
<span className="hidden ms-auto sm:flex item-center me-1">
321321
<Kbd data-platform="mac"></Kbd>

0 commit comments

Comments
 (0)