allinoneaccessibility 0.0.3 → 1.0.0

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/LICENSE +21 -0
  4. data/README.md +481 -0
  5. data/app/assets/javascripts/allinoneaccessibility.js +6 -0
  6. data/app/controllers/all_in_one_accessibility/settings_controller.rb +119 -0
  7. data/config/routes.rb +7 -0
  8. data/lib/all_in_one_accessibility/configuration.rb +154 -0
  9. data/lib/all_in_one_accessibility/engine.rb +23 -0
  10. data/lib/all_in_one_accessibility/helper.rb +69 -0
  11. data/lib/all_in_one_accessibility/loader.js +122 -0
  12. data/lib/all_in_one_accessibility/site_config.rb +88 -0
  13. data/lib/all_in_one_accessibility/version.rb +5 -0
  14. data/lib/all_in_one_accessibility/widget.rb +63 -0
  15. data/lib/all_in_one_accessibility.rb +66 -0
  16. data/lib/allinoneaccessibility.rb +6 -8
  17. data/lib/generators/all_in_one_accessibility/install/install_generator.rb +85 -0
  18. data/lib/generators/all_in_one_accessibility/install/templates/initializer.rb.tt +52 -0
  19. data/settings/assets/aioa-icon-type-13-BYUd2bq8.svg +1 -0
  20. data/settings/assets/index-BU8JE2ja.js +44 -0
  21. data/settings/assets/index-DGh_DzL5.css +1 -0
  22. data/settings/icon.svg +1 -0
  23. data/settings/index.html +23 -0
  24. metadata +83 -101
  25. data/MIT-LICENSE +0 -20
  26. data/Rakefile +0 -32
  27. data/lib/allinoneaccessibility/version.rb +0 -3
  28. data/lib/assets/javascripts/allinoneaccessibility.js +0 -1426
  29. data/lib/tasks/allinoneaccessibility_tasks.rake +0 -4
  30. data/test/chartjs_test.rb +0 -7
  31. data/test/dummy/Gemfile +0 -1
  32. data/test/dummy/Gemfile.lock +0 -85
  33. data/test/dummy/README.rdoc +0 -28
  34. data/test/dummy/Rakefile +0 -6
  35. data/test/dummy/app/assets/javascripts/application.js +0 -14
  36. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  37. data/test/dummy/app/controllers/application_controller.rb +0 -5
  38. data/test/dummy/app/helpers/application_helper.rb +0 -2
  39. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  40. data/test/dummy/bin/bundle +0 -3
  41. data/test/dummy/bin/rails +0 -4
  42. data/test/dummy/bin/rake +0 -4
  43. data/test/dummy/config/application.rb +0 -23
  44. data/test/dummy/config/boot.rb +0 -5
  45. data/test/dummy/config/database.yml +0 -25
  46. data/test/dummy/config/environment.rb +0 -5
  47. data/test/dummy/config/environments/development.rb +0 -29
  48. data/test/dummy/config/environments/production.rb +0 -80
  49. data/test/dummy/config/environments/test.rb +0 -36
  50. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  51. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  52. data/test/dummy/config/initializers/inflections.rb +0 -16
  53. data/test/dummy/config/initializers/mime_types.rb +0 -5
  54. data/test/dummy/config/initializers/secret_token.rb +0 -12
  55. data/test/dummy/config/initializers/session_store.rb +0 -3
  56. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  57. data/test/dummy/config/locales/en.yml +0 -23
  58. data/test/dummy/config/routes.rb +0 -56
  59. data/test/dummy/config.ru +0 -4
  60. data/test/dummy/public/404.html +0 -58
  61. data/test/dummy/public/422.html +0 -58
  62. data/test/dummy/public/500.html +0 -57
  63. data/test/dummy/public/favicon.ico +0 -0
  64. data/test/test_helper.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dee44b01f639255784d64bf1f3f6ed7b1328df057d186aa86751a104150e3fd8
4
- data.tar.gz: a0920a5f6b4756af41af97ba3ecd685423cb3a081e76277885c21db10b23ea57
3
+ metadata.gz: 465202c35a9c4c658672e326dd0a145c27112dd7149e761fdc4f4e5f553b3b20
4
+ data.tar.gz: 2eb657ceef7f089bc79f1ab3332b95490ef57c1b1c2d98de4f276097e5cdaf94
5
5
  SHA512:
6
- metadata.gz: 612a59f88edf8eedd164e9b8447e688016129f37b02eaf302cb7e8d9d06dc076b9112af1aa54b57879e1154919736dd2713d9af98ed01a194e6a72d849ea6a46
7
- data.tar.gz: 9af9b440e8fa9fdbb48dea138bc92b526c583a25c6f143501fb8d6d3dc760f4bff27f33cfe0adfd61ee5b7fb2560336c17b71a6d69da66c7ccae5fb7e3d64a93
6
+ metadata.gz: 1702587860622388e5926bc8f22c8d55d61c454c0bcd57df9c4ac85ba7e7e42f5c6fe46439efaa0267249ded07dd08de4099b4f45cf06cef382d9881afbe01f2
7
+ data.tar.gz: f4be3f4d71dbf5f9dfdb74485639f58fd8a86f10e01b11bbe4a431baf070bad26e48f52acd0718b1720708030652c4d20d94430098444de4e4ce057b7eac8134
data/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ All notable changes to the All in One Accessibility® Ruby on Rails gem (`allinoneaccessibility` on RubyGems).
4
+
5
+ ## [1.0.0]
6
+
7
+ A rewrite. Version 0.0.x (2023) required Rails 4.0 and did not add the widget itself; 1.0.0 adds it with a view helper and comes with a settings page. See **Upgrading from 0.0.x** in the README.
8
+
9
+ ### Changed from 0.0.x
10
+
11
+ - Requires Rails 6.1 to 8 (0.0.x required Rails 4.0); Rails 4.0 apps keep 0.0.3.
12
+ - The widget is added by `<%= all_in_one_accessibility_tag %>` in the layout, set up by `rails generate all_in_one_accessibility:install`. The code is in the `AllInOneAccessibility` module (0.0.x: an empty `AllinOneAccessibility::Rails::Engine`).
13
+ - `app/assets/javascripts/allinoneaccessibility.js` is now an empty file. In 0.0.x it was a copy of the Chart.js library, not widget code. It stays so that `//= require allinoneaccessibility` in an app's `application.js` keeps working.
14
+ - The gem declares the MIT license (0.0.x had none in its gemspec).
15
+
16
+ ### Added
17
+
18
+ - **`all_in_one_accessibility_tag` view helper** (alias `aioa_widget_tag`) that adds the widget script, `<script id="aioa-adawidget" src="…">`, found by its id so it is never added twice. The script URL is the same as in the Gatsby, Framer and Strapi plugins (`?colorcode=#420083&token=&position=bottom_right`).
19
+ - **`load_strategy` option**: `:idle` (default) adds the widget after the page has loaded, when the browser is idle; `:delay` adds it `delay` ms later (default 5000); `:head` renders a deferred tag in the `<head>`.
20
+ - **Turbo (Hotwire) support** (`turbo`, default on): the widget's elements are moved into the new `<body>` on every Turbo Drive visit, stale copies from Turbo's page cache are dropped, and Turbo 8 page refreshes leave the widget alone. While a visitor has an adjustment on (font size, spacing, contrast, …), links and Back / Forward load the next page in full, and turning an adjustment on while viewing a Turbo-rendered page reloads it once, so the widget applies the adjustments to the new content. Visitors with no adjustments on keep Turbo navigation.
21
+ - **Content Security Policy nonce** on the helper's tags when the app has a nonce generator.
22
+ - **Settings page**, a mountable Rails engine (`mount AllInOneAccessibility::Engine, at: "/aioa"`). It is the same settings page as the Gatsby and Framer plugins, with the same three tabs: **Appearance Design** (color, widget size, position, icon type, icon size), **Paid Features** (mobile position, custom links, widget behavior switches) and **Accessibility Score** (scan results), the free and paid plan banners, validation, the Dashboard button and a light / dark theme. It is a prebuilt static page that calls the Skynet Technologies API from the browser; the engine only serves its files and its `config.json`, with a Content Security Policy that allows only the Skynet Technologies API hosts.
23
+ - **Explicit consent before anything is sent.** The first visit to the settings page shows the site's domain and where it came from, the data region and the widget script, and states what **Enable** sends and to whom. A free widget account (`add-user-domain`, platform `Ruby on Rails`) is created only after **Enable**, only when `widget-settings` has no record of the domain, and only once per 10 minutes.
24
+ - **Access control for the settings page**: on in development and test only by default (`settings_page`); outside them it also needs `authorize_settings_page`, a block that runs in the settings controller (HTTP basic auth, `current_user&.admin?`, …), and answers `403 Forbidden` without one. `parent_controller` lets the settings controller inherit from the app's `ApplicationController`.
25
+ - **`website_url` option**, defaulting to the host of `Rails.application.routes.default_url_options`, then of `config.action_mailer.default_url_options`, then the address the settings page was opened on. URLs are reduced to their hostname; `localhost` and IP addresses are refused.
26
+ - **`region` option** (`:global` or `:eu`): serves the widget from `www.skynettechnologies.com` or `eu.skynettechnologies.com`, and is the data region of a new account (`no_required_eu`). No geolocation service is used.
27
+ - **`enabled`**, **`license_key`** options.
28
+ - **Option checks at boot**: an unknown `region` or `load_strategy`, or a `delay` that is not a number, raises an `ArgumentError`; a `website_url` or `license_key` that can't be used is ignored with a warning (in the log, and on stderr when the log does not reach the console) and listed on the settings page.
29
+ - **Install generator**, `rails generate all_in_one_accessibility:install`: creates the initializer, mounts the settings page and adds the helper to `app/views/layouts/application.html.erb` (options `--mount-path`, `--layout`, `--skip-layout`, `--skip-route`).
30
+ - Minitest suite for the options, the helper, `config.json`, the settings page's access rules and the generator.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Skynet Technologies USA LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,481 @@
1
+ # All in One Accessibility® – Free ADA Accessibility Widget for Ruby on Rails
2
+
3
+ This free Ruby on Rails accessibility gem makes your website more usable for people with visual, auditory, motor, or cognitive disabilities. It supports assistive technologies and helps align with WCAG 2.1, 2.2, ADA, EAA, Section 508, France RGAA, California Unruh, European EAA EN 301 549, UK Equality Act, Spain UNE 139803:2012, Australian DDA, Israeli Standard 5568, UAE Disability Act (Federal Law No. 29 of 2006), Saudi Web Accessibility Standards, Qatar National e-Accessibility Policy, Ontario AODA, Canada ACA, German BITV, Brazilian Inclusion Law (LBI 13.146/2015), JIS X 8341 (Japan), Italian Stanca Act, Indian RPwD Act, Switzerland DDA, and other [accessibility standards](https://www.skynettechnologies.com/accessibility-standards).
4
+
5
+ This lightweight [free ADA accessibility widget](https://www.skynettechnologies.com/free-website-accessibility-widget) quickly adds essential accessibility features that support inclusive browsing and compliance efforts.
6
+
7
+ ## Highlights
8
+
9
+ - **Free forever:** Essential accessibility features at no cost.
10
+ - **Quick setup:** Add the gem, run one generator, and the widget is on every page that uses your layout.
11
+ - **Multilingual:** 190+ languages with automatic language detection.
12
+ - **Customizable:** Match the widget's colors, size, icon, and position to your site's mobile and desktop designs, from a settings page that the gem mounts in your Rails app.
13
+ - **Fast:** The widget loads after your page has loaded, so it does not slow down your Rails app.
14
+ - **Works with Hotwire:** The widget stays on the page across Turbo Drive visits.
15
+ - **Free support:** Our support team helps with installation and any queries.
16
+ - **Easy upgrade:** Upgrade to advanced accessibility anytime and get 100+ features, including screen reader, talk & type, and voice navigation. Try them with a [10-day free trial](https://ada.skynettechnologies.us/trial-subscription).
17
+
18
+ ## What You Get with the Free Widget
19
+
20
+ - Auto-detect language
21
+ - 190+ languages
22
+ - Skip to Navigation / Content / Footer
23
+ - Content adjustment options
24
+ - Visual & color adjustments
25
+ - Reading mask
26
+ - Widget customization (colors, size, icon, and position)
27
+ - Accessibility statement
28
+
29
+ Explore the [**free accessibility widget features guide**](https://www.skynettechnologies.com/sites/default/files/Free-Accessibility-Widget-Features-Guide.pdf).
30
+
31
+ ## Who Is the Free Widget For?
32
+
33
+ Businesses, developers, agencies, content teams, ecommerce brands, educational institutions, and public-facing organizations using Ruby on Rails who want to improve WCAG accessibility, usability, and user experience quickly without complex development.
34
+
35
+ ## Why Choose This Free Widget?
36
+
37
+ - Aligns with global accessibility standards.
38
+ - Improves usability for people with visual, cognitive, and motor impairments.
39
+ - Works with any Rails app that renders HTML: ERB, Haml or Slim layouts, Hotwire / Turbo, importmap, jsbundling or Webpacker.
40
+ - Supports multisite setups for global reach.
41
+ - Free support from our team for installation and queries.
42
+ - Core features at no cost.
43
+
44
+ ## Free vs Pro
45
+
46
+ See the full [free widget vs paid app comparison](https://www.skynettechnologies.com/installation-guide/free-vs-paid-accessibility-widget-comparison-video).
47
+
48
+ ## Security and Privacy
49
+
50
+ - This free accessibility gem follows several data and application security practices, including ISO 9001:2015 & ISO 27001:2022, GDPR, CCPA, COPPA, HIPAA, and SOC 2 Type II.
51
+ - Skynet Technologies USA LLC is an organizational member of IAAP and W3C.
52
+ - No personal data is intentionally stored by the gem itself. It adds no database tables, models, cookies or background jobs.
53
+ - Your Rails server never contacts Skynet Technologies. The widget runs in your visitors' browsers, and the settings page calls Skynet Technologies from your browser, only after you press **Enable** (see [Settings page](#settings-page)).
54
+ - The settings page is on in development and test only. In production it stays off until you turn it on **and** say who may open it (see [Settings page in production](#settings-page-in-production)).
55
+ - Site owners are responsible for reviewing their own compliance requirements.
56
+
57
+ ## Limitations
58
+
59
+ - Some advanced features require a commercial subscription and Paid Add-ons.
60
+ - The gem improves accessibility and usability but is not a full replacement for manual WCAG remediation.
61
+ - API-only Rails apps (`config.api_only = true`) render no HTML layouts, so there is nowhere to add the widget. Add it in the front end that renders your pages instead.
62
+
63
+ ## FAQs
64
+
65
+ **Does this free accessibility gem support multilingual Rails sites?**
66
+
67
+ Yes. It supports 190+ languages.
68
+
69
+ **Which languages do the screen reader, virtual keyboard, and other advanced features support?**
70
+
71
+ 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 15+ languages. [See language support details](https://www.skynettechnologies.com/all-in-one-accessibility/languages).
72
+
73
+ **How can I upgrade from the free widget to the paid app?**
74
+
75
+ Upgrade to a paid subscription with 100+ advanced features. Check out the [upgrade steps](https://www.skynettechnologies.com/blog/upgrade-from-all-in-one-accessibility-free-widget-to-premium-version).
76
+
77
+ **What additional features are available in the paid version?**
78
+
79
+ 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.
80
+
81
+ **Can I try Pro before buying?**
82
+
83
+ Yes. Pro comes with a [10-day free trial](https://ada.skynettechnologies.us/trial-subscription) that includes all features.
84
+
85
+ **Which Rails and Ruby versions are supported?**
86
+
87
+ Rails 6.1 to 8 on Ruby 2.7 or later. The gem depends only on `railties`, `actionpack` and `actionview`. The test suite runs on Rails 7.1 and 8.1 (Ruby 3.4), and the gem is tested in a Rails 8.1 app with Turbo 8.
88
+
89
+ **Does it work with Turbo (Hotwire)?**
90
+
91
+ Yes. Turbo Drive replaces the page's `<body>` on every visit, and the widget lives in `<body>`. The gem's loader moves the widget into the new page before Turbo shows it, so the widget stays on the page, and with Turbo 8 page refreshes (morphing) it keeps the widget out of the morph. The widget applies adjustments such as font size to the elements on the page when it starts, so while a visitor has any adjustment on, links and Back / Forward load the next page in full and the widget applies them to it. Visitors with no adjustments on keep Turbo's fast navigation. See [Turbo](#turbo-hotwire). Turn this off with `config.turbo = false`.
92
+
93
+ **Does the widget slow down my site?**
94
+
95
+ By default the widget script is added only after the page has loaded, when the browser is idle, so it does not delay your content. See [`load_strategy`](#options).
96
+
97
+ ## Supported Languages (190+)
98
+
99
+ English (USA), English (UK), English (Australian), English (Canadian), English (South Africa), Español, Español (Mexicano), Deutsch, عربى, Português, Português (Brazil), 日本語, Français, Italiano, Polski, Pусский, 中文, 中文 (Traditional), עִברִית, Magyar, Slovenčina, Suomenkieli, Türkçe, Ελληνικά, Latinus, Български, Català, Čeština, Dansk, Nederlands, हिंदी, Bahasa Indonesia, 한국인, Lietuvių, Bahasa Melayu, Norsk, Română, Slovenščina, Svenska, แบบไทย, Українська, Việt Nam, বাঙালি, සිංහල, አማርኛ, Hmoob, မြန်မာ, Eesti keel, latviešu, Cрпски, Hrvatski, ქართული, ʻŌlelo Hawaiʻi, Cymraeg, Cebuano, Samoa, Kreyòl ayisyen, Føroyskt, Crnogorski, Azerbaijani, Euskara, Tagalog, Galego, Norsk Bokmål, فارسی, ਪੰਜਾਬੀ, shqiptare, Hայերեն, অসমীয়া, Aymara, Bamanankan, беларускі, bosanski, Corsu, ދިވެހި, Esperanto, Eʋegbe, Frisian, guarani, ગુજરાતી, Hausa, íslenskur, Igbo, Gaeilge, basa jawa, ಕನ್ನಡ, қазақ, ខ្មែរ, Kinyarwanda, Kurdî, Кыргызча, ພາສາລາວ, Lingala, Luganda, lëtzebuergesch, македонски, Malagasy, മലയാളം, Malti, Maori, मराठी, Монгол, नेपाली, Sea, ଓଡିଆ, Afaan Oromoo, پښتو, Runasimi, संस्कृत, Gàidhlig na h-Alba, Sesotho, Shona, سنڌي, Soomaali, basa Sunda, kiswahili, тоҷикӣ, தமிழ், Татар, తెలుగు, ትግሪኛ, Tsonga, Türkmenler, Ride, اردو, ئۇيغۇر, o'zbek, isiXhosa, יידיש, Yoruba, Zulu, भोजपुरी, डोगरी, कोंकणी, Kurdî, Krio, मैथिली, Meiteilon, Mizo tawng, Sepedi, Ilocano, دری
100
+
101
+ ## Prerequisites
102
+
103
+ - A Rails app that renders HTML pages (Rails 6.1 to 8, Ruby 2.7 or later).
104
+ - Your live site's domain, for the settings page: `config.website_url` in the gem's initializer, or the host in `Rails.application.routes.default_url_options` or `config.action_mailer.default_url_options`. All in One Accessibility works per domain, so the settings page manages the widget of that domain. `localhost` and IP addresses can't be used.
105
+
106
+ ## Installation
107
+
108
+ 1. Add the gem to your `Gemfile` and install it:
109
+
110
+ ```bash
111
+ bundle add allinoneaccessibility
112
+ ```
113
+
114
+ or add `gem "allinoneaccessibility"` to the `Gemfile` and run `bundle install`.
115
+
116
+ 2. Run the install generator:
117
+
118
+ ```bash
119
+ bin/rails generate all_in_one_accessibility:install
120
+ ```
121
+
122
+ It makes three changes:
123
+
124
+ | File | Change |
125
+ | --- | --- |
126
+ | `config/initializers/all_in_one_accessibility.rb` | Every option, commented out (see [Options](#options)) |
127
+ | `config/routes.rb` | `mount AllInOneAccessibility::Engine, at: "/aioa"`, the [settings page](#settings-page) |
128
+ | `app/views/layouts/application.html.erb` | `<%= all_in_one_accessibility_tag %>` just before `</head>` |
129
+
130
+ The widget is now on every page that uses that layout. Generator options: `--mount-path=/admin/accessibility`, `--layout=public` (for `app/views/layouts/public.html.erb`), `--skip-layout`, `--skip-route`.
131
+
132
+ With a Haml or Slim layout, or more than one layout, add the helper to each layout's `<head>` yourself:
133
+
134
+ ```erb
135
+ <%= all_in_one_accessibility_tag %>
136
+ ```
137
+
138
+ ```haml
139
+ = all_in_one_accessibility_tag
140
+ ```
141
+
142
+ 3. Set your live domain in `config/initializers/all_in_one_accessibility.rb`, unless it is already the host of `default_url_options`:
143
+
144
+ ```ruby
145
+ AllInOneAccessibility.configure do |config|
146
+ config.website_url = "www.example.com"
147
+ end
148
+ ```
149
+
150
+ 4. Start your Rails server (`bin/rails server`) and open the settings page at **`http://localhost:3000/aioa/`**. Press **Enable** to link your domain to its All in One Accessibility account, then configure the widget. See [Settings page](#settings-page).
151
+
152
+ 5. Deploy your app as usual.
153
+
154
+ Gem name: [`allinoneaccessibility`](https://rubygems.org/gems/allinoneaccessibility). In your code everything is named `all_in_one_accessibility` / `AllInOneAccessibility` (the helper, the generator, the initializer and the engine).
155
+
156
+ ## Upgrading from 0.0.x
157
+
158
+ Version 1.0.0 is a rewrite. The 0.0.x gem (2023) required Rails 4.0 and did not add the widget itself: it shipped an `allinoneaccessibility.js` asset, and the widget script was pasted into `application.js` by hand.
159
+
160
+ 1. Update the gem (`bundle update allinoneaccessibility`). Version 1.0.0 needs Rails 6.1 or later; Rails 4.0 apps keep 0.0.3.
161
+ 2. Run `bin/rails generate all_in_one_accessibility:install`.
162
+ 3. Remove the widget script you pasted into `application.js`, if any; the helper adds it now. The line `//= require allinoneaccessibility` can stay (the asset is now an empty file) or be removed.
163
+
164
+ Your widget settings (color, icon, position, size) are stored with your domain's account at Skynet Technologies, so they carry over; the [settings page](#settings-page) shows them.
165
+
166
+ ## Options
167
+
168
+ Set them in `config/initializers/all_in_one_accessibility.rb`:
169
+
170
+ ```ruby
171
+ AllInOneAccessibility.configure do |config|
172
+ config.website_url = ENV["AIOA_WEBSITE_URL"]
173
+ config.region = :eu
174
+ config.load_strategy = :idle
175
+ config.enabled = !Rails.env.test?
176
+ end
177
+ ```
178
+
179
+ | Option | Default | Description |
180
+ | --- | --- | --- |
181
+ | `website_url` | host of `default_url_options` | Your live site's domain, for example `www.example.com` (a URL is reduced to its hostname). The settings page manages the widget of this domain. Without it the settings page uses the host of `Rails.application.routes.default_url_options`, then of `config.action_mailer.default_url_options`, then the address the settings page was opened on, if that is a public domain. |
182
+ | `region` | `:global` | Where the widget is served from and its data kept: `:global` (`www.skynettechnologies.com`) or `:eu` (`eu.skynettechnologies.com`, European Union). Also the data region of a new widget account. |
183
+ | `load_strategy` | `:idle` | When the widget loads. `:idle`: after the page has loaded, when the browser is idle. `:delay`: `delay` milliseconds after the page has loaded. `:head`: a deferred `<script>` tag in the `<head>`, the earliest load. |
184
+ | `delay` | `5000` | Milliseconds to wait with `load_strategy = :delay` (0 to 60000). |
185
+ | `enabled` | `true` | Add the widget in this environment. `true`, `false` or a lambda, for example `!Rails.env.test?`. When `false`, `all_in_one_accessibility_tag` renders nothing. |
186
+ | `turbo` | `true` | Keep the widget on the page across Turbo Drive visits (see [Turbo](#turbo-hotwire)). |
187
+ | `license_key` | `""` | Sent as the widget script's `token`, only for plans that use a license key. |
188
+ | `settings_page` | development and test only | Serve the settings page. `true` or `false`; leave it unset for development and test only. Outside development and test it also needs `authorize_settings_page`. |
189
+ | `authorize_settings_page` | none | Who may open the settings page outside development and test: a block that runs in the settings controller and returns `true` to allow the request. See [Settings page in production](#settings-page-in-production). |
190
+ | `parent_controller` | `"ActionController::Base"` | The class the settings controller inherits from. Set `"ApplicationController"` to use your app's sign-in helpers (for example Devise's `current_user`) in `authorize_settings_page`. |
191
+
192
+ An unknown `region` or `load_strategy`, or a `delay` that is not a number, raises an `ArgumentError` when the app boots. A `website_url` or `license_key` that can't be used is ignored with a warning (in the log, and on the terminal while the app boots) and listed on the settings page, so a value read from `ENV` never stops the app from booting.
193
+
194
+ ### The helper
195
+
196
+ `all_in_one_accessibility_tag` (alias `aioa_widget_tag`) renders, depending on `load_strategy`:
197
+
198
+ - `:idle` / `:delay`: a small inline `<script>` that adds the widget script after the page has loaded, and keeps the widget across Turbo visits.
199
+ - `:head`: `<script id="aioa-adawidget" src="…" defer>`, plus the inline script for Turbo (none with `turbo = false`).
200
+
201
+ Both carry your [Content Security Policy](#content-security-policy) nonce when your app has a nonce generator. Pass `nonce: false` to leave it out, or `nonce: "…"` to set it yourself.
202
+
203
+ ## Settings page
204
+
205
+ Configure the widget from the settings page that the gem mounts in your Rails app.
206
+
207
+ **Path:** `http://localhost:3000/aioa/` (your server's address, and the path of the `mount` line in `config/routes.rb`)
208
+
209
+ **Steps:**
210
+
211
+ 1. Start your Rails server and open `/aioa/` in your browser.
212
+ 2. **First visit: Enable.** The page shows your site's domain and where it comes from (`config.website_url` or `default_url_options`), the data region and the widget script, and what **Enable** does. Nothing is sent before you press it. **Enable**:
213
+ - **Sends your site's domain** to `ada.skynettechnologies.us` to look up its All in One Accessibility account, and creates a free widget account only if the domain has none (name: the domain, email: `no-reply@<domain>`). The widget is provisioned per domain, so this is required. No page content, visitor data, user records, or other app data is sent.
214
+ - Changes nothing in your Rails app or its database.
215
+ 3. Configure options (color, icon type, position, size) on the **Appearance Design** tab. On a paid plan, the **Paid Features** tab adds the mobile position, custom accessibility statement and report-a-problem links, and widget behavior switches, and the **Accessibility Score** tab shows your site's scan results.
216
+ 4. Click **Save Changes**. It may take a few seconds for changes to appear on your website.
217
+
218
+ **Save Changes** checks every field first. A custom color, exact position or exact icon size that is missing or out of range (and, on a paid plan, the Paid Features fields) is marked in red with a message under it, and nothing is saved until it is fixed.
219
+
220
+ Settings are stored with your domain's account at Skynet Technologies, not in your Rails app, so they apply to the live site right away, without a deploy. Later visits to the settings page open the settings directly.
221
+
222
+ The settings page loads and saves the widget settings of your site's domain with Skynet Technologies (`ada.skynettechnologies.us`, `freeada.skynettechnologies.com`, and `skynetaccessibilityscan.com` for the Accessibility Score tab), straight from your browser. It is a prebuilt page that ships with the gem (no CDN, no asset pipeline needed), served with its own Content Security Policy that allows only those hosts.
223
+
224
+ **Upgrade to Paid Plan** (on the free plan banner and the locked tabs) opens the trial form with your site's domain filled in.
225
+
226
+ ### Settings page in production
227
+
228
+ You can manage the widget from development only: the settings are stored with your domain's account, not in your app, so a change made on `localhost` applies to the live site.
229
+
230
+ To open the settings page on a deployed app as well, turn it on and say who may open it. Without `authorize_settings_page`, the page answers `403 Forbidden` outside development and test.
231
+
232
+ A password (HTTP basic authentication):
233
+
234
+ ```ruby
235
+ AllInOneAccessibility.configure do |config|
236
+ config.settings_page = true
237
+ config.authorize_settings_page do
238
+ password = ENV["AIOA_SETTINGS_PASSWORD"].to_s
239
+ authenticate_or_request_with_http_basic("All in One Accessibility") do |_name, given|
240
+ password.present? && ActiveSupport::SecurityUtils.secure_compare(given, password)
241
+ end
242
+ end
243
+ end
244
+ ```
245
+
246
+ Your app's own sign-in, for example Devise:
247
+
248
+ ```ruby
249
+ AllInOneAccessibility.configure do |config|
250
+ config.settings_page = true
251
+ config.parent_controller = "ApplicationController" # current_user, your before_actions, ...
252
+ config.authorize_settings_page { current_user&.admin? }
253
+ end
254
+ ```
255
+
256
+ With Devise you can also protect the route itself, and then allow every request that reaches the controller:
257
+
258
+ ```ruby
259
+ # config/routes.rb
260
+ authenticate :user, ->(user) { user.admin? } do
261
+ mount AllInOneAccessibility::Engine, at: "/aioa"
262
+ end
263
+
264
+ # config/initializers/all_in_one_accessibility.rb
265
+ config.settings_page = true
266
+ config.authorize_settings_page { true }
267
+ ```
268
+
269
+ To remove the settings page altogether, delete the `mount` line, or set `config.settings_page = false`.
270
+
271
+ ## Widget script
272
+
273
+ The accessibility widget that runs on your site is served by Skynet Technologies. The gem adds this script to every page that renders the helper (global data region; the European Union region uses `eu.skynettechnologies.com`):
274
+
275
+ ```html
276
+ <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>
277
+ ```
278
+
279
+ - **When it loads** depends on [`load_strategy`](#options). With the default `:idle`, the tag is added in the browser after the page has loaded, when the browser is idle.
280
+ - **Added once.** The tag is found by its `aioa-adawidget` id, so it is never added twice, also when the helper is in more than one layout or Turbo renders the loader again. Keep the id: the widget finds its own tag by it.
281
+ - **Your choice of data region.** The gem does not use any geolocation service. The `region` option decides which server the widget is served from, and is sent once, when a new free widget account is created.
282
+ - The widget communicates with `*.skynettechnologies.com` and `*.skynettechnologies.us`, and loads the services listed in [CORS Policy Configuration](#cors-policy-configuration).
283
+
284
+ ### Turbo (Hotwire)
285
+
286
+ Turbo Drive replaces `<body>` on every visit, and the widget lives in `<body>`. With `config.turbo = true` (the default) the gem's loader:
287
+
288
+ - moves the widget's elements into the new `<body>` on `turbo:before-render`, at the same place (the skip links stay first), and drops stale copies from Turbo's page cache, so the back button never shows two widgets;
289
+ - keeps the widget's elements out of Turbo 8 page refreshes (`turbo:before-morph-element`).
290
+
291
+ The widget script itself stays in `<head>`, which Turbo keeps, so it runs only once.
292
+
293
+ **Adjustments (font size, line height, spacing, contrast, …).** The widget applies them when it starts, to the elements on the page at that time, so content that Turbo renders later would not get them. While a visitor has any adjustment on (the widget's icon shows a check mark), the loader:
294
+
295
+ - lets link clicks load the next page in full (it cancels `turbo:click`), so the widget applies the adjustments to it;
296
+ - reloads the page on Back / Forward (Turbo restore visits);
297
+ - reloads the page once when the visitor turns an adjustment on while viewing a page that Turbo rendered.
298
+
299
+ Visitors with no adjustments on keep Turbo Drive navigation as usual. Links that target a Turbo Frame or request a Turbo Stream, and form submissions, still go through Turbo (so a redirect's flash message is not lost); the content they render gets the adjustments on the next full page load.
300
+
301
+ ### Content Security Policy
302
+
303
+ If your app sends a Content Security Policy (`config/initializers/content_security_policy.rb`), allow the widget's hosts:
304
+
305
+ ```ruby
306
+ Rails.application.configure do
307
+ config.content_security_policy do |policy|
308
+ policy.script_src :self, "https://*.skynettechnologies.com"
309
+ policy.style_src :self, :unsafe_inline, "https://*.skynettechnologies.com", "https://fonts.googleapis.com"
310
+ policy.connect_src :self, "https://*.skynettechnologies.com", "https://*.skynettechnologies.us"
311
+ policy.img_src :self, :data, "https://*.skynettechnologies.com"
312
+ policy.font_src :self, :data, "https://*.skynettechnologies.com", "https://fonts.gstatic.com"
313
+ policy.media_src :self, :data, :blob # the widget's open / close sounds
314
+ end
315
+
316
+ # The helper's inline loader carries this nonce
317
+ config.content_security_policy_nonce_generator = ->(request) { SecureRandom.base64(16) }
318
+ config.content_security_policy_nonce_directives = %w[script-src]
319
+ end
320
+ ```
321
+
322
+ The settings page sets its own policy and does not need these.
323
+
324
+ ## Demo
325
+
326
+ See how the widget performs with improved accessibility features:
327
+
328
+ [![Free accessibility widget demo video](https://img.youtube.com/vi/VMHx30aUnR4/0.jpg)](https://www.youtube.com/watch?v=VMHx30aUnR4)
329
+
330
+ ## CORS Policy Configuration
331
+
332
+ To avoid CORS policy issues, ensure the following URLs are allowed on your website. Add them to your CORS configuration or trusted domains list.
333
+
334
+ | **Domain** | **Description** | **Usage** |
335
+ | --- | --- | --- |
336
+ | https://\*.skynettechnologies.com | Skynet Technologies (Global Domain) | API access and resources |
337
+ | https://\*.skynettechnologies.us | Skynet Technologies (US Domain) | API access and resources |
338
+ | https://skynetaccessibilityscan.com | SkynetAccessibility Scanner | Accessibility scan results and score |
339
+ | https://\*.googleapis.com | Google APIs | Services like Fonts, Translation |
340
+ | https://\*.gstatic.com | Fonts APIs | Custom Fonts |
341
+ | https://vlibras.gov.br | VLibras – Brazilian Sign Language Service | Sign Language |
342
+
343
+ **Instructions**
344
+
345
+ 1. Update your server's CORS configuration to include these URLs.
346
+ 2. Ensure wildcard subdomains (\*) are supported where necessary.
347
+ 3. Verify functionality by testing requests to these domains.
348
+ 4. If issues persist, consult the documentation for CORS configuration guidance.
349
+
350
+ ## Development
351
+
352
+ The gem is plain Ruby with no runtime dependencies beyond Rails. The settings page is a React + Vite app in `settings-app/`, built into `settings/` (which is what the gem ships):
353
+
354
+ ```bash
355
+ bundle install
356
+ bundle exec rake settings # installs settings-app's dependencies and builds settings/
357
+ bundle exec rake test # options, helper, settings page and generator (Minitest)
358
+ ```
359
+
360
+ `rake build` builds the settings page first. To work on the settings page alone, run `AIOA_WEBSITE=www.example.com npm run dev` in `settings-app/`; it serves a `config.json` like the Rails engine does.
361
+
362
+ Layout:
363
+
364
+ | Path | What it is |
365
+ | --- | --- |
366
+ | `allinoneaccessibility.gemspec`, `lib/allinoneaccessibility.rb` | The gem (RubyGems name `allinoneaccessibility`) and its entry point |
367
+ | `lib/all_in_one_accessibility/configuration.rb` | The options and their checks |
368
+ | `lib/all_in_one_accessibility/widget.rb` | The widget script URL and domain rules |
369
+ | `lib/all_in_one_accessibility/helper.rb`, `loader.js` | `all_in_one_accessibility_tag` and its inline loader |
370
+ | `lib/all_in_one_accessibility/engine.rb`, `config/routes.rb` | The mountable engine |
371
+ | `app/assets/javascripts/allinoneaccessibility.js` | Empty, keeps the 0.0.x `//= require allinoneaccessibility` line working |
372
+ | `app/controllers/all_in_one_accessibility/settings_controller.rb` | Serves the settings page and its `config.json` |
373
+ | `lib/all_in_one_accessibility/site_config.rb` | What `config.json` holds |
374
+ | `lib/generators/all_in_one_accessibility/install/` | `rails generate all_in_one_accessibility:install` |
375
+ | `settings-app/` → `settings/` | Settings page source, and its build |
376
+
377
+ ## Documentation
378
+
379
+ - [**All in One Accessibility**](https://www.skynettechnologies.com/all-in-one-accessibility)
380
+ - [**Free Accessibility Widget Features Guide**](https://www.skynettechnologies.com/sites/default/files/Free-Accessibility-Widget-Features-Guide.pdf)
381
+ - [**Free Widget vs Paid App Comparison**](https://www.skynettechnologies.com/installation-guide/free-vs-paid-accessibility-widget-comparison-video)
382
+
383
+ ## Support
384
+
385
+ **Submit a Support Request**
386
+
387
+ 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.
388
+
389
+ **Send Us an Email**
390
+
391
+ Email our support team: [**hello@skynettechnologies.com**](mailto:hello@skynettechnologies.com)
392
+
393
+ ## Accessibility Paid Add-on Services
394
+
395
+ [**Manual Accessibility Audit**](https://www.skynettechnologies.com/website-accessibility-audit)
396
+
397
+ - Evaluate your website's accessibility with a [web accessibility consultant](https://www.skynettechnologies.com/web-accessibility-consultant).
398
+ - WCAG 2.0 / 2.1 / 2.2 Level AA conformance testing
399
+ - Automated, semi-automated, and manual testing
400
+ - Simple before-after UI/UX recommendations on how to fix the issues
401
+ - Comprehensive audit report
402
+
403
+ [**Manual Accessibility Remediation**](https://www.skynettechnologies.com/full-website-accessibility-remediation)
404
+
405
+ Our experts manually fix accessibility issues across your website to meet WCAG standards, improve the experience for people with disabilities, and provide a detailed report of the improvements made.
406
+
407
+ [**VPAT Report / Accessibility Conformance Report (ACR)**](https://www.skynettechnologies.com/vpat-accessibility-conformance-report)
408
+
409
+ The Voluntary Product Accessibility Template (VPAT), also known as an Accessibility Conformance Report (ACR), starts with an audit and documents the current accessibility of a website, application, or other digital asset.
410
+
411
+ ## Accessibility Paid Add-ons
412
+
413
+ A faster, cost-effective way to extend accessibility across your website and documents.
414
+
415
+ [**SkynetAccessibility Scanner**](https://www.skynettechnologies.com/accessibility-scanning-and-monitoring)
416
+
417
+ Automatically scan and monitor your website for WCAG and ADA issues, and track compliance progress quickly.
418
+
419
+ [**SkynetA11y PDF Remediation**](https://www.skynettechnologies.com/pdf-accessibility-remediation)
420
+
421
+ AI-powered PDF accessibility remediation - upload PDFs, scan website PDFs, and download remediated files.
422
+
423
+ [**MS Office File Accessibility Checker**](https://www.skynettechnologies.com/file-accessibility-checker)
424
+
425
+ Microsoft Office files (Word, Excel, PowerPoint) accessible quickly and cost-effectively.
426
+
427
+ [**Voice Search**](https://www.skynettechnologies.com/voice-enabled-search)
428
+
429
+ Let visitors search your website using their voice.
430
+
431
+ [**White Label Accessibility**](https://www.skynettechnologies.com/all-in-one-accessibility/addons#accessibility-widget-add-ons)
432
+
433
+ Remove the Skynet Technologies logo and all footer links, popups, the "report a problem" link, and more for full white-label control.
434
+
435
+ [**Instant Live Site Translations**](https://www.skynettechnologies.com/all-in-one-accessibility/addons#accessibility-widget-add-ons)
436
+
437
+ 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.
438
+
439
+ [**Modify Accessibility Menu**](https://www.skynettechnologies.com/all-in-one-accessibility/addons#accessibility-widget-add-ons)
440
+
441
+ Reorder, remove, and restructure menu buttons to fit users' specific accessibility needs.
442
+
443
+ ## Partnership Opportunities
444
+
445
+ [**Agency Accessibility Partnership**](https://www.skynettechnologies.com/agency-partners)
446
+
447
+ Partner with us as an agency to provide comprehensive ADA, EAA, and WCAG accessibility solutions to clients. Get access to exclusive resources, training, and support to implement and manage accessibility features effectively.
448
+
449
+ [**Affiliate Partnership**](https://www.skynettechnologies.com/affiliate-partner)
450
+
451
+ Earn commissions by promoting our accessibility solutions and help businesses improve their website accessibility.
452
+
453
+ For more details, explore [**accessibility partnership opportunities**](https://www.skynettechnologies.com/partner-program).
454
+
455
+ ## Screenshots
456
+
457
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-1-free.jpg?v=3)
458
+
459
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-2-free.jpg?v=3)
460
+
461
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-3-free.jpg?v=3)
462
+
463
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-4-free.jpg?v=3)
464
+
465
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-5-free.jpg?v=3)
466
+
467
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-6-free.jpg?v=3)
468
+
469
+ ![App Screenshot](https://www.skynettechnologies.com/sites/default/files/screenshot-7-free.jpg?v=3)
470
+
471
+ ## Credits
472
+
473
+ This gem is developed and maintained by [website accessibility remediation company](https://www.skynettechnologies.com/) – Skynet Technologies USA LLC.
474
+
475
+ ## Current Maintainers
476
+
477
+ - [**Skynet Technologies USA LLC**](https://github.com/skynettechnologies)
478
+
479
+ ---
480
+
481
+ _README Version: 26.11.28_
@@ -0,0 +1,6 @@
1
+ // All in One Accessibility (allinoneaccessibility gem)
2
+ //
3
+ // Intentionally empty. Versions 0.0.x told apps to add a "require allinoneaccessibility"
4
+ // directive to application.js (Sprockets); this file keeps that directive from breaking
5
+ // the asset build. The widget is now added by all_in_one_accessibility_tag in the
6
+ // layout's head (see the gem's README, "Upgrading from 0.0.x"). The directive can be removed.