sanity-plugin-all-in-one-accessibility 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,12 +34,12 @@ Businesses, developers, agencies, content teams, ecommerce brands, educational i
34
34
 
35
35
  - Aligns with global accessibility standards.
36
36
  - Improves usability for people with visual, cognitive, and motor impairments.
37
- - Works with any website frontend that renders your Sanity content.
37
+ - Integrates smoothly with most Sanity themes and templates.
38
38
  - Supports multisite setups for global reach.
39
39
  - Free support from our team for installation and queries.
40
40
  - Core features at no cost.
41
41
 
42
- ## Free vs Pro
42
+ ## Free vs Paid
43
43
 
44
44
  See the full [free widget vs paid app comparison](https://www.skynettechnologies.com/installation-guide/free-vs-paid-accessibility-widget-comparison-video).
45
45
 
@@ -65,7 +65,7 @@ Yes. It supports 190+ languages.
65
65
 
66
66
  **Which languages do the screen reader, virtual keyboard, and other advanced features support?**
67
67
 
68
- In the paid app, Screen Reader, Talk & Type, and Live Site Translation support 50+ languages; the Virtual Keyboard supports 40+ languages; Voice Navigation and Dictionary Search support 20+ languages. [See language support details](https://www.skynettechnologies.com/all-in-one-accessibility/languages).
68
+ The widget interface supports 190+ languages. In the paid app, Screen Reader supports 100+, Voice Navigation 50+, Talk & Type 50+, Virtual Keyboard 40+, Dictionary Search 20+, and Live Site Translation 160+. [See language support details](https://www.skynettechnologies.com/all-in-one-accessibility/languages).
69
69
 
70
70
  **How can I upgrade from the free widget to the paid app?**
71
71
 
@@ -73,11 +73,15 @@ Upgrade to a paid subscription with 100+ advanced features. Check out the [upgra
73
73
 
74
74
  **What additional features are available in the paid version?**
75
75
 
76
- The paid app includes a screen reader, voice navigation, talk & type, virtual keyboard, dictionary search, 12 accessibility profiles tailored for different disability groups, Libras (Brazilian Sign Language), automated compliance accessibility reports, AI-based remediation guidelines, and more. Explore the [paid accessibility app](https://www.skynettechnologies.com/all-in-one-accessibility) and buy now.
76
+ The paid app includes a screen reader, voice navigation, talk & type, virtual keyboard, dictionary search, 12 accessibility profiles tailored for different disability groups, Libras (Brazilian Sign Language), American Sign Language, automated compliance accessibility reports, AI-based remediation guidelines, and more. Explore the [paid accessibility app](https://www.skynettechnologies.com/all-in-one-accessibility) and buy now.
77
77
 
78
- **Can I try Pro before buying?**
78
+ **Can I try the paid app before buying?**
79
79
 
80
- Yes. Pro comes with a [10-day free trial](https://ada.skynettechnologies.us/trial-subscription) that includes all features.
80
+ Yes. The paid app comes with a [10-day free trial](https://ada.skynettechnologies.us/trial-subscription) that includes all features.
81
+
82
+ **Which themes are supported?**
83
+
84
+ Any website frontend that renders your Sanity content, such as plain HTML and React / Next.js sites, and many more.
81
85
 
82
86
  ## Supported Languages (190+)
83
87
 
@@ -85,37 +89,41 @@ English (USA), English (UK), English (Australian), English (Canadian), English (
85
89
 
86
90
  ## Prerequisites
87
91
 
88
- - Sanity Studio v4 or newer (React 18 or 19)
92
+ - Sanity Studio v4, v5 or v6 (React 18 or 19)
89
93
  - Node.js 20.19+ or 22.12+
90
94
 
91
- - Tested and verified on Sanity Studio 6.3
95
+ - Tested and verified on Sanity Studio 6.24
92
96
 
93
97
  ## Installation
94
98
 
95
99
  1. Install the plugin in your Sanity Studio project:
96
100
 
97
- ```sh
98
- npm install sanity-plugin-all-in-one-accessibility
99
- ```
101
+ ```sh
102
+ npm install sanity-plugin-all-in-one-accessibility
103
+ ```
100
104
 
101
- 1. Add it as a plugin in `sanity.config.ts` (or `.js`):
102
-
103
- ```ts
104
- import {defineConfig} from 'sanity'
105
- import {AllinOneAccessibilityPlugin} from 'sanity-plugin-all-in-one-accessibility'
106
-
107
- export default defineConfig({
108
- //...
109
- plugins: [
110
- AllinOneAccessibilityPlugin({
111
- // Optional: the website the widget runs on (default: the Studio's hostname)
112
- websiteUrl: 'www.your-website.com',
113
- }),
114
- ],
115
- })
116
- ```
105
+ 2. Add it as a plugin in `sanity.config.ts` (or `.js`). The options are described under [Plugin options](#plugin-options).
106
+
107
+ ```ts
108
+ import {defineConfig} from 'sanity'
109
+ import {AllinOneAccessibilityPlugin} from 'sanity-plugin-all-in-one-accessibility'
117
110
 
118
- **Plugin options** (all optional):
111
+ export default defineConfig({
112
+ //...
113
+ plugins: [
114
+ AllinOneAccessibilityPlugin({
115
+ // Optional: the website the widget runs on (default: the Studio's hostname)
116
+ websiteUrl: 'www.your-website.com',
117
+ }),
118
+ ],
119
+ })
120
+ ```
121
+
122
+ 3. Add the widget script to the **header** or **footer** of your website frontend, as shown in [Add the Script](#add-the-script).
123
+
124
+ ### Plugin options
125
+
126
+ All options are optional.
119
127
 
120
128
  | Option | Default | Description |
121
129
  | --- | --- | --- |
@@ -123,13 +131,11 @@ export default defineConfig({
123
131
  | `username` | The signed-in Sanity user's name | Admin name sent once, when a new website is registered for the free widget. |
124
132
  | `email` | The signed-in Sanity user's email | Admin email sent once, when a new website is registered (falls back to `no-reply@<website>`). |
125
133
 
126
- 1. Add the widget script to the **header** or **footer** of your website frontend:
127
-
128
- ## Add the Script
134
+ ### Add the Script
129
135
 
130
136
  Place the following script in the **header** or **footer** section of your website or frontend:
131
137
 
132
- ### Option A: Plain HTML
138
+ #### Option A: Plain HTML
133
139
 
134
140
  Place this script before the closing `</body>` tag (or in the footer template).
135
141
 
@@ -137,7 +143,7 @@ Place this script before the closing `</body>` tag (or in the footer template).
137
143
  <script id="aioa-adawidget" src="https://www.skynettechnologies.com/accessibility/js/all-in-one-accessibility-js-widget-minify.js?colorcode=#420083&token=&position=bottom_right"></script>
138
144
  ```
139
145
 
140
- ### Option B: React/Next.js
146
+ #### Option B: React/Next.js
141
147
 
142
148
  Add this to a client component (e.g., your layout or a top-level page). The script loads the widget after a short delay to avoid blocking page rendering.
143
149
 
@@ -155,17 +161,17 @@ setTimeout(() => {
155
161
  }, 5000);
156
162
  ```
157
163
 
158
- ## EU Region Support (Recommended for EU-Based Websites)
164
+ ### EU Region Support (Recommended for EU-Based Websites)
159
165
 
160
166
  If your website or business operates in the **European Union (EU)**, use the **EU region–hosted script** to improve performance for EU users and better align with GDPR and EU data residency requirements.
161
167
 
162
- ### EU Script Base URL
168
+ #### EU Script Base URL
163
169
 
164
170
  ```text
165
171
  https://eu.skynettechnologies.com/accessibility/js/all-in-one-accessibility-js-widget-minify.js
166
172
  ```
167
173
 
168
- ### Option A: Plain HTML (EU Region)
174
+ #### Option A: Plain HTML (EU Region)
169
175
 
170
176
  ```html
171
177
  <script
@@ -174,7 +180,7 @@ https://eu.skynettechnologies.com/accessibility/js/all-in-one-accessibility-js-w
174
180
  </script>
175
181
  ```
176
182
 
177
- ### Option B: React / Next.js (EU Region)
183
+ #### Option B: React / Next.js (EU Region)
178
184
 
179
185
  ```typescript
180
186
  function load_aioa_script() {
@@ -196,19 +202,20 @@ Check out our [**Sanity WCAG accessibility widget installation steps**](https://
196
202
 
197
203
  ## Configuration
198
204
 
199
- Configure the widget from Sanity Studio.
205
+ Configure the widget from the Sanity admin panel.
200
206
 
201
207
  **Path:** Sanity Studio → **All in One Accessibility** (top navigation)
202
208
 
203
209
  **Steps:**
204
210
 
205
- 1. Log in to your Sanity Studio.
206
- 2. Open Sanity Studio → **All in One Accessibility** (top navigation). A website that is not registered yet is registered for the free widget automatically the first time the tool opens.
207
- 3. On **Appearance Design**, configure the widget color, widget size, position, icon type and icon size.
208
- 4. On a paid plan, also use **Paid Features** (widget position for mobile, custom accessibility statement and report a problem links, external link navigation, open/close sound) and **Accessibility Score** (scan results of your website). The **Dashboard** button opens your All in One Accessibility dashboard.
209
- 5. Click **Save Changes**.
211
+ 1. Log in to the Sanity admin panel.
212
+ 2. Navigate to Sanity Studio → **All in One Accessibility** (top navigation).
213
+ 3. Configure options (color, icon type, position, size).
214
+ 4. Save your changes.
215
+
216
+ An exact position can be set from 0 to 500 px and an exact icon size from 24 to 150 px. On a paid plan, the **Paid Features** tab (widget position for mobile, custom links, widget switches), the **Accessibility Score** tab and the **Dashboard** button are also available.
210
217
 
211
- When a website is registered for the first time, the website domain and the admin's name and email (the signed-in Sanity user, or the `username` / `email` plugin options) are sent to Skynet Technologies to set up the free widget. Your browser's location is checked once with ipapi.co to tell whether you are in the EU. If your Studio has a Content Security Policy, allow the domains in the CORS table below in `connect-src`.
218
+ A website that is not registered yet is registered for the free widget the first time the tool opens. The website domain and the admin's name and email (the signed-in Sanity user, or the `username` / `email` plugin options) are then sent to Skynet Technologies, and your browser's location is checked once with ipapi.co to tell whether you are in the EU. If your Studio has a Content Security Policy, allow the domains in the CORS table below in `connect-src`.
212
219
 
213
220
  ## Demo
214
221
 
@@ -224,13 +231,13 @@ To avoid CORS policy issues, ensure the following URLs are allowed on your websi
224
231
  | --- | --- | --- |
225
232
  | https://\*.skynettechnologies.com | Skynet Technologies (Global Domain) | API access and resources |
226
233
  | https://\*.skynettechnologies.us | Skynet Technologies (US Domain) | API access and resources |
227
- | <https://skynetaccessibilityscan.com> | SkynetAccessibility Scanner | Accessibility scan results and score |
234
+ | https://skynetaccessibilityscan.com | SkynetAccessibility Scanner | Accessibility scan results and score |
228
235
  | https://\*.googleapis.com | Google APIs | Services like Fonts, Translation |
229
236
  | https://\*.gstatic.com | Fonts APIs | Custom Fonts |
230
- | <https://vlibras.gov.br> | VLibras – Brazilian Sign Language Service | Sign Language |
231
- | <https://ipapi.co> | ipapi – IP Geolocation API | Called once during installation to detect an EU location and add the EU-based widget script (endpoint: `/json/`) |
237
+ | https://vlibras.gov.br | VLibras – Brazilian Sign Language Service | Sign Language |
238
+ | https://ipapi.co | ipapi – IP Geolocation API | Called once during installation to detect an EU location and add the EU-based widget script (endpoint: `/json/`) |
232
239
 
233
- ### Instructions
240
+ **Instructions**
234
241
 
235
242
  1. Update your server's CORS configuration to include these URLs.
236
243
  2. Ensure wildcard subdomains (\*) are supported where necessary.
@@ -246,11 +253,11 @@ To avoid CORS policy issues, ensure the following URLs are allowed on your websi
246
253
 
247
254
  ## Support
248
255
 
249
- ### Submit a Support Request
256
+ **Submit a Support Request**
250
257
 
251
258
  Visit our [**support page**](https://www.skynettechnologies.com/report-accessibility-problem) and fill out the form. Our team will get back to you as soon as possible.
252
259
 
253
- ### Send Us an Email
260
+ **Send Us an Email**
254
261
 
255
262
  Email our support team: [**hello@skynettechnologies.com**](mailto:hello@skynettechnologies.com)
256
263
 
@@ -298,7 +305,7 @@ Remove the Skynet Technologies logo and all footer links, popups, the "report a
298
305
 
299
306
  [**Instant Live Site Translations**](https://www.skynettechnologies.com/all-in-one-accessibility/addons#accessibility-widget-add-ons)
300
307
 
301
- Translate your website into over 190 languages instantly to enhance accessibility for non-native speakers, individuals with language acquisition difficulties, and those with learning disabilities.
308
+ Translate your website into 160+ languages instantly to enhance accessibility for non-native speakers, individuals with language acquisition difficulties, and those with learning disabilities.
302
309
 
303
310
  [**Modify Accessibility Menu**](https://www.skynettechnologies.com/all-in-one-accessibility/addons#accessibility-widget-add-ons)
304
311
 
package/dist/index.js CHANGED
@@ -338,7 +338,7 @@ function base64(value) {
338
338
  binary += String.fromCharCode(byte);
339
339
  return window.btoa(binary);
340
340
  }
341
- const LINKS = ["statement_link", "report_problem_link"], POSITION_MESSAGE = "Enter a horizontal and a vertical position from 0 to 250 px.", OFFSET_MAX = 250, SIZE_MIN = 20, SIZE_MAX = 150, SIZE_MESSAGE = `Enter an exact icon size from ${SIZE_MIN} to ${SIZE_MAX} px.`;
341
+ const LINKS = ["statement_link", "report_problem_link"], OFFSET_MAX = 500, POSITION_MESSAGE = `Enter a horizontal and a vertical position from 0 to ${OFFSET_MAX} px.`, POSITION_HINT = `0 - ${OFFSET_MAX}px are permitted values`, SIZE_MIN = 24, SIZE_MAX = 150, SIZE_MESSAGE = `Enter an exact icon size from ${SIZE_MIN} to ${SIZE_MAX} px.`, SIZE_HINT = `${SIZE_MIN} - ${SIZE_MAX}px are permitted values`;
342
342
  function isValidIconSize(value) {
343
343
  const size = wholeNumber(value, null);
344
344
  return size !== null && size >= SIZE_MIN && size <= SIZE_MAX;
@@ -436,7 +436,7 @@ function collect(appearanceIn, paidIn, domain, isPaid) {
436
436
  focus: appearance.x.trim() === "" ? "x" : "y",
437
437
  name: "Widget position",
438
438
  title: "Position missing",
439
- message: 'Enter the exact position (0 - 250 px), or turn off "Set an exact position in pixels".'
439
+ message: `Enter the exact position (0 - ${OFFSET_MAX} px), or turn off "Set an exact position in pixels".`
440
440
  })), appearance.customSize && !isValidIconSize(appearance.iconSizeCustom) && (appearance = { ...appearance, sizeCheck: !0 }, problems.push({
441
441
  tab: "appearance",
442
442
  focus: "iconSizeCustom",
@@ -449,7 +449,7 @@ function collect(appearanceIn, paidIn, domain, isPaid) {
449
449
  focus: paid.mx.trim() === "" ? "mx" : "my",
450
450
  name: "Widget position for mobile (Paid Features)",
451
451
  title: "Mobile position missing",
452
- message: "Enter the exact mobile position (0 - 250 px) on the Paid Features tab."
452
+ message: `Enter the exact mobile position (0 - ${OFFSET_MAX} px) on the Paid Features tab.`
453
453
  }));
454
454
  const linkErrors = { ...paid.linkErrors }, links = {
455
455
  statement_link: paid.statement_link,
@@ -862,7 +862,7 @@ function PositionSection({ state, update, refs }) {
862
862
  }
863
863
  )
864
864
  ] }),
865
- /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-pos-range-hint", children: "0 - 250px are permitted values" }),
865
+ /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-pos-range-hint", children: POSITION_HINT }),
866
866
  /* @__PURE__ */ jsx("p", { className: "aioa-error", id: "aioa-pos-error", hidden: !state.positionCheck, children: state.positionCheck ? POSITION_MESSAGE : "" })
867
867
  ] })
868
868
  ] });
@@ -971,7 +971,7 @@ function IconSizeSection({ state, update, refs }) {
971
971
  ),
972
972
  /* @__PURE__ */ jsx("span", { className: "aioa-affix-text", "aria-hidden": "true", children: "px" })
973
973
  ] }),
974
- /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-size-range-hint", children: "20 - 150px are permitted values" }),
974
+ /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-size-range-hint", children: SIZE_HINT }),
975
975
  /* @__PURE__ */ jsx("p", { className: "aioa-error", id: "aioa-size-error", hidden: !state.sizeCheck, children: state.sizeCheck ? SIZE_MESSAGE : "" })
976
976
  ] })
977
977
  ] });
@@ -1422,7 +1422,7 @@ function MobilePosition({
1422
1422
  }
1423
1423
  )
1424
1424
  ] }),
1425
- /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-mobile-range-hint", children: "0 - 250px are permitted values" }),
1425
+ /* @__PURE__ */ jsx("p", { className: "aioa-hint", id: "aioa-mobile-range-hint", children: POSITION_HINT }),
1426
1426
  /* @__PURE__ */ jsx("p", { className: "aioa-error", id: "aioa-mobile-pos-error", hidden: !state.mobileCheck, children: state.mobileCheck ? POSITION_MESSAGE : "" })
1427
1427
  ] })
1428
1428
  ]