From 22e478d8a1339274ab0682be881cc3f435eb1e0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Yuniel=20Acosta=20P=C3=A9rez?=
<33158051+yacosta738@users.noreply.github.com>
Date: Fri, 15 May 2026 15:53:34 +0200
Subject: [PATCH 01/33] chore: rename twodft to dallay across all package
references
---
demo/package.json | 2 +-
package.json | 16 ++++++----------
packages/core/CHANGELOG.md | 6 +++---
packages/core/README.md | 30 +++++++++++++++---------------
packages/core/package.json | 12 ++++++------
packages/service/package.json | 6 +++---
6 files changed, 34 insertions(+), 38 deletions(-)
diff --git a/demo/package.json b/demo/package.json
index b270d795..0a4cc880 100644
--- a/demo/package.json
+++ b/demo/package.json
@@ -16,7 +16,7 @@
},
"devDependencies": {
"@astrojs/cloudflare": "^13.1.8",
- "@twodft/astro-icon": "workspace:*",
+ "@dallay/astro-icon": "workspace:*",
"astro": "^6.1.4"
}
}
diff --git a/package.json b/package.json
index 33afdb62..747d14ae 100644
--- a/package.json
+++ b/package.json
@@ -4,29 +4,25 @@
"version": "0.0.0",
"type": "module",
"scripts": {
- "build": "pnpm --filter @twodft/astro-icon --filter www run build",
+ "build": "pnpm --filter @dallay/astro-icon --filter www run build",
"dev": "pnpm -r run dev",
- "lint": "prettier \"**/*.{js,ts,md,json}\"",
- "version": "changeset version && pnpm install --no-frozen-lockfile --lockfile-only"
+ "lint": "prettier \"**/*.{js,ts,md,json}\""
},
"repository": {
"type": "git",
- "url": "git+https://github.com/twodft/astro-icon.git"
+ "url": "git+https://github.com/dallay/astro-icon.git"
},
"keywords": [],
"license": "MIT",
"bugs": {
- "url": "https://github.com/twodft/astro-icon/issues"
+ "url": "https://github.com/dallay/astro-icon/issues"
},
- "homepage": "https://github.com/natemoo-re/astro-icon#readme",
+ "homepage": "https://github.com/dallay/astro-icon#readme",
"packageManager": "pnpm@10.33.0",
"engines": {
"node": ">=22.12.0"
},
- "dependencies": {
- "@changesets/changelog-github": "^0.6.0",
- "@changesets/cli": "^2.30.0"
- },
+ "dependencies": {},
"devDependencies": {
"prettier": "^3.8.1"
}
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index e57ceb14..4bee72bd 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -22,16 +22,16 @@
### Patch Changes
-- Fix compatibility with Astro v6 and `@astrojs/cloudflare` v13 in development and server-rendered builds by preventing `@twodft/astro-icon/components` from being prebundled before the integration's virtual module is registered.
+- Fix compatibility with Astro v6 and `@astrojs/cloudflare` v13 in development and server-rendered builds by preventing `@dallay/astro-icon/components` from being prebundled before the integration's virtual module is registered.
## 1.2.0
-First release as `@twodft/astro-icon`, a maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon).
+First release as `@dallay/astro-icon`, a maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon).
### Minor Changes
- Upgraded to support **Astro v6.x** and updated all dependencies (TypeScript 6, Vite 7, Node 22+).
-- Migrated package namespace from `astro-icon` to `@twodft/astro-icon`.
+- Migrated package namespace from `astro-icon` to `@dallay/astro-icon`.
### Patch Changes
diff --git a/packages/core/README.md b/packages/core/README.md
index 3222a7d6..9fbde510 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -2,14 +2,14 @@
> **A community-maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon) by [Nate Moore](https://github.com/natemoo-re), updated for Astro v6.x and Cloudflare Workers compatibility.**
-[](https://www.npmjs.com/package/@twodft/astro-icon)
+[](https://www.npmjs.com/package/@dallay/astro-icon)
[](./LICENSE)
---
## ⚠️ About This Fork
-This package (`@twodft/astro-icon`) is a **ported and extended version** of the original [`astro-icon`](https://github.com/natemoo-re/astro-icon) created by **[Nate Moore (@natemoo-re)](https://github.com/natemoo-re)**.
+This package (`@dallay/astro-icon`) is a **ported and extended version** of the original [`astro-icon`](https://github.com/natemoo-re/astro-icon) created by **[Nate Moore (@natemoo-re)](https://github.com/natemoo-re)**.
The original `astro-icon` is an excellent integration that has served the Astro community well. This fork exists to address specific compatibility needs that arose with newer versions of Astro and serverless deployment targets:
@@ -32,20 +32,20 @@ If the upstream project resumes active development with Astro v6 support, we rec
### Using npm
```sh
-npm install @twodft/astro-icon
+npm install @dallay/astro-icon
```
### Using pnpm
```sh
-pnpm add @twodft/astro-icon
+pnpm add @dallay/astro-icon
```
Then, add the integration to your `astro.config.mjs`:
```js
import { defineConfig } from "astro/config";
-import icon from "@twodft/astro-icon";
+import icon from "@dallay/astro-icon";
export default defineConfig({
integrations: [icon()],
@@ -66,7 +66,7 @@ By default, Astro Icon supports custom local `svg` icons. They are optimized wit
```astro
---
-import { Icon } from '@twodft/astro-icon/components';
+import { Icon } from '@dallay/astro-icon/components';
---
@@ -83,7 +83,7 @@ Astro Icon also supports [Iconify](https://iconify.design) icon sets out-of-the-
```astro
---
-import { Icon } from '@twodft/astro-icon/components'
+import { Icon } from '@dallay/astro-icon/components'
---
@@ -117,7 +117,7 @@ Styling your icons is straightforward. Any styles can be targeted to the `[data-
```astro
---
-import { Icon } from '@twodft/astro-icon/components';
+import { Icon } from '@dallay/astro-icon/components';
---
diff --git a/demo/src/pages/index.astro b/demo/src/pages/index.astro
index 8004907b..66f36116 100644
--- a/demo/src/pages/index.astro
+++ b/demo/src/pages/index.astro
@@ -1,5 +1,8 @@
---
-const _icon = "adjustment";
+import { Icon } from "@dallay/astro-icon/components";
+import Base from "../layouts/base.astro";
+
+const icon = "adjustment";
---
@@ -12,6 +15,7 @@ const _icon = "adjustment";
Local Icons
+
@@ -30,16 +34,18 @@ const _icon = "adjustment";
render it here!
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/core/components/Icon.astro b/packages/core/components/Icon.astro
index e00a86f9..7e2ecf75 100644
--- a/packages/core/components/Icon.astro
+++ b/packages/core/components/Icon.astro
@@ -100,7 +100,7 @@ if (!iconData) {
throw err;
}
-const _id = `ai:${collection.prefix}:${iconName ?? setName}`;
+const id = `ai:${collection.prefix}:${iconName ?? setName}`;
if (props.size) {
props.width = props.size;
@@ -108,11 +108,26 @@ if (props.size) {
delete props.size;
}
const renderData = iconToSVG(iconData);
+
+// Determine accessible role:
+// - If a title is provided the icon is meaningful → role="img"
+// - Otherwise it is decorative → aria-hidden="true"
+const isDecorative = !title;
+const descId = desc ? `${id}:desc` : undefined;
const normalizedProps = {
...(renderData.attributes as Partial),
+ // Prevent SVGs from being focusable in IE/Edge and some browsers
+ focusable: "false" as const,
+ // Decorative icons must be hidden from the accessibility tree (WCAG 1.1.1).
+ // Meaningful icons get role="img" and, when a desc is provided, aria-describedby
+ // pointing to the stable so assistive technologies read the description.
+ ...(isDecorative
+ ? { "aria-hidden": "true" as const }
+ : { role: "img" as const, ...(descId ? { "aria-describedby": descId } : {}) }),
...props,
};
-const _normalizedBody = renderData.body;
+// biome-ignore lint/correctness/noUnusedVariables: used in the Astro template below, outside Biome's JS scope
+const normalizedBody = renderData.body;
// biome-ignore lint/correctness/noUnusedVariables: viewBox is extracted to remove it from normalizedProps via delete
const { viewBox } = normalizedProps;
@@ -123,10 +138,10 @@ if (includeSymbol) {