Skip to content

Commit 9995ca5

Browse files
committed
Add tabindex to main content for improved accessibility
1 parent 83d952a commit 9995ca5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/layouts/BlogPost.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
5757

5858
<body>
5959
<Header />
60-
<main id="main-content">
60+
<main id="main-content" tabindex="-1">
6161
<article>
6262
<div class="hero-image">
6363
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}

src/pages/blog/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const posts = (await getCollection("blog")).sort((a, b) => b.data.pubDate.valueO
8686
</head>
8787
<body>
8888
<Header />
89-
<main id="main-content">
89+
<main id="main-content" tabindex="-1">
9090
<section>
9191
<ul>
9292
{

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { SITE_DESCRIPTION, SITE_TITLE } from "../consts";
1212
</head>
1313
<body>
1414
<Header />
15-
<main id="main-content">
15+
<main id="main-content" tabindex="-1">
1616
<h1>🧑‍🚀 Hello, Astronaut!</h1>
1717
<p>
1818
Welcome to the official <a href="https://astro.build/">Astro</a> blog starter template. This template serves as a lightweight, minimally-styled starting point for anyone looking to build a personal website, blog, or portfolio with Astro.

0 commit comments

Comments
 (0)