Skip to content

Avoid adding redundant aria-current="false" to sidebar entries#3658

Merged
delucis merged 2 commits intomainfrom
chris/sidebar-aria-current-fix
Jan 16, 2026
Merged

Avoid adding redundant aria-current="false" to sidebar entries#3658
delucis merged 2 commits intomainfrom
chris/sidebar-aria-current-fix

Conversation

@delucis
Copy link
Member

@delucis delucis commented Jan 16, 2026

Description

This PR fixes handling of a boolean attribute in our sidebar code to avoid adding redundant aria-current="false" attributes. Before Astro v5, passing false to aria-current resulted in omitting the attribute in the HTML output. But since v5, this is now stringified to "false" (Astro only omits the attribute for officially boolean attributes in the HTML spec now).

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

🦋 Changeset detected

Latest commit: 8020758

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Jan 16, 2026

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 8020758
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/696a2b6cc1439500080c85f9
😎 Deploy Preview https://deploy-preview-3658--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@delucis delucis added the 🌟 patch Change that triggers a patch release label Jan 16, 2026
@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Jan 16, 2026
@astrobot-houston
Copy link
Contributor

size-limit report 📦

Path Size
/index.html 7.28 KB (0%)
/_astro/*.js 25.76 KB (0%)
/_astro/*.css 14.3 KB (0%)

Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, we missed one case, great catch.

The changes look great and I also confirmed the fix by comparing the live and deploy versions 🚀

@delucis delucis merged commit ac79329 into main Jan 16, 2026
18 checks passed
@delucis delucis deleted the chris/sidebar-aria-current-fix branch January 16, 2026 13:37
@astrobot-houston astrobot-houston mentioned this pull request Jan 16, 2026
dadezzz pushed a commit to dadezzz/ice-notes that referenced this pull request Jan 25, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.37.3` → `0.37.4`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.37.3/0.37.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fstarlight/0.37.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fstarlight/0.37.3/0.37.4?slim=true) |

---

### Release Notes

<details>
<summary>withastro/starlight (@&#8203;astrojs/starlight)</summary>

### [`v0.37.4`](https://github.com/withastro/starlight/blob/HEAD/packages/starlight/CHANGELOG.md#0374)

[Compare Source](https://github.com/withastro/starlight/compare/@astrojs/starlight@0.37.3...@astrojs/starlight@0.37.4)

##### Patch Changes

- [#&#8203;3534](withastro/starlight#3534) [`703fab0`](withastro/starlight@703fab0) Thanks [@&#8203;HiDeoo](https://github.com/HiDeoo)! - Fixes support for running builds when `npx` is unavailable.

  Previously, Starlight would spawn a process to run the Pagefind search indexing binary using `npx`. On platforms where `npx` isn’t available, this could cause issues. Starlight now runs Pagefind using its Node.js API to avoid a separate process. As a side effect, you may notice that logging during builds is now less verbose.

- [#&#8203;3656](withastro/starlight#3656) [`a0e6368`](withastro/starlight@a0e6368) Thanks [@&#8203;delucis](https://github.com/delucis)! - Fixes several edge cases in highlighting the current page heading in Starlight’s table of contents

- [#&#8203;3663](withastro/starlight#3663) [`00cbf00`](withastro/starlight@00cbf00) Thanks [@&#8203;lines-of-codes](https://github.com/lines-of-codes)! - Adds Thai language support

- [#&#8203;3658](withastro/starlight#3658) [`ac79329`](withastro/starlight@ac79329) Thanks [@&#8203;delucis](https://github.com/delucis)! - Avoids adding redundant `aria-current="false"` attributes to sidebar entries

- [#&#8203;3382](withastro/starlight#3382) [`db295c2`](withastro/starlight@db295c2) Thanks [@&#8203;trueberryless](https://github.com/trueberryless)! - Fixes an issue where the mobile table of contents is unable to find the first heading when a page has a tall banner.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Renovate Bot <renovate@zarantonello.dev>
Co-committed-by: Renovate Bot <renovate@zarantonello.dev>
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Jan 29, 2026
* main:
  Avoid adding redundant `aria-current="false"` to sidebar entries (withastro#3658)
  Add link to a new community pluing (withastro#3657)
  [ci] release (withastro#3654)
  chore(deps): update actions/setup-node action to v6.2.0 (withastro#3655)
  Fix: Prevent font-size adjustments on iOS after orientation change (withastro#3648)
  feat: ✨ add catchintent starlight docs for showcase (withastro#3652)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants