=== AccessiBit === Contributors: accessibit Tags: accessibility, wcag, a11y, audit Requires at least: 6.0 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Install the AccessiBit accessibility widget and read your accessibility results in WordPress. == Description == Connect your AccessiBit account without leaving WordPress to install the accessibility widget and read your site's accessibility results directly in your WordPress admin. There is no key to copy: you enter your email address, AccessiBit sends you a one-time code, and you type it on the Setup screen. If you have no AccessiBit account yet, one is created for you in the same step. You can also connect through the browser, by signing in to AccessiBit. When you connect, AccessiBit scans your homepage once, free of charge, and the plugin shows you the first few issues it found along with the total. To scan the rest of your pages, and to see every issue with the detail behind it, run a full audit in the AccessiBit dashboard. Customize the widget's look and tools, and write and publish your accessibility statement, without leaving WordPress: **AccessiBit → Widget** and **AccessiBit → Statement** are the same screens as in the AccessiBit dashboard. Put the published statement on any page with the **Accessibility statement** block or the `[accessibit_statement]` shortcode. Full audits of more pages and your plan are managed in the AccessiBit dashboard; the plugin links straight to the right page for this site, and shows you the score of the latest full audit it finds. The admin screens are in English, with Italian and Spanish translations delivered by WordPress.org language packs. == Installation == You do not need an AccessiBit account beforehand: one can be created while connecting. 1. Install and activate the plugin. 2. Go to **AccessiBit → Setup** in wp-admin. 3. Enter your email address and press **Send code**. AccessiBit emails you a six-digit code; type it on the same screen. 4. If that address has no AccessiBit account, the screen asks for your name and your company's name, and for your agreement to AccessiBit's terms, and creates the account with this site in it. 5. AccessiBit then scans your homepage once, free of charge, and shows you what it found on **AccessiBit → Accessibility**. 6. On that same screen, switch on **Show the accessibility widget** to put the widget on your site. Prefer to sign in to AccessiBit in your browser? **Connect through the browser**, on the same screen, takes you there to approve the connection and brings you back connected. Nothing leaves your site before you press Send code or Connect. If your site address is not one of the sites on your AccessiBit account and your role there cannot add one, the Setup screen says so and names the address it compared; once the site is added, **Check again** picks it up. Scanning requires the site's domain to be verified in your AccessiBit account. The plugin does this for you right after connecting, when WordPress is at the root of its domain: AccessiBit reads a one-time answer from your site's public address, which only the WordPress at that address can give. If that does not go through, the Accessibility and Setup screens say why, offer **Verify from this site** to try again, and link to the page in AccessiBit where you can verify the domain another way. == Frequently Asked Questions == = My WordPress is in a subdirectory. What gets scanned? = The address registered for the site in your AccessiBit account, which is a domain rather than a path. So an install at `example.com/blog` is scanned at `example.com` — the root of the domain, not the WordPress install. The same applies to every site of a subdirectory multisite: they share one domain and therefore one free scan. If your WordPress is not at the root of its domain, run your scans from the AccessiBit dashboard, where you can give the exact pages. For the same reason such an install cannot verify the domain from WordPress: verify it in your AccessiBit account instead. = The code did not arrive. What now? = Check the spam folder, and that the address on the screen is the one you meant; **Use another email** takes you back. **Get a new code** is available after one minute, and a new code replaces the previous one. A code is valid for a limited time and for a few attempts, and only on the site that asked for it. If email does not reach you at all, use **Connect through the browser**. = "Verify from this site" says AccessiBit could not read the verification. Why? = AccessiBit has to reach your site from the internet while WordPress waits for its answer. A site that is not public yet (a local or password-protected copy, a maintenance page), a firewall or security plugin that blocks unknown visitors or the WordPress REST API, or a host that runs one request at a time will stop it. Nothing is wrong with your connection: verify the domain from your AccessiBit account, with the link beside the button, then press **Check again**. = How do I put my accessibility statement on my site? = Write it on **AccessiBit → Statement** and publish it. Then add the **Accessibility statement** block to a page, or paste the `[accessibit_statement]` shortcode into one. Each visitor sees the statement in their own language (Italian, English or Spanish); to always show one language, pick it in the block's settings or write `[accessibit_statement lang="it"]`. To link the statement from a menu or the footer, add that page to the menu (Appearance → Menus, or the Navigation block in the Site Editor). The Statement screen also gives you the statement's own address, if you prefer to link to it directly. The statement is hosted by AccessiBit and shown in a frame, so a change you publish reaches your page without editing it again. Until it is published the block shows nothing to visitors; a statement first published from the AccessiBit dashboard appears within fifteen minutes, or at once after you open the Statement screen. If a caching plugin stored the page while it was still empty, clear that page from its cache. If your plan stops including the statement, AccessiBit stops showing it, and the frame on your page is left empty. Remove the block or the shortcode, or renew the plan to bring the statement back. = Does the widget work with a caching or optimization plugin? = Yes. The widget tag carries the attributes that Autoptimize, LiteSpeed Cache, WP Rocket and Cloudflare Rocket Loader read as "leave this file alone", so JavaScript aggregation, minification and delayed execution all skip it. Page caching needs no exception at all, because the tag is part of the cached HTML. If your optimization plugin uses some other mechanism, exclude cdn.accessibit.com from its JavaScript combining and minification. The widget has to stay a separate file: it reads which account it belongs to from its own script tag, so once it is merged into a combined bundle it can no longer find it, and the widget simply stops appearing — with nothing in the console to tell you why. == Screenshots == 1. The Setup screen before connecting, with the email field and Send code. 2. A connected site, showing the AccessiBit account it belongs to. 3. The free homepage scan, the widget switch, the latest full audit's score, and the links to the widget and statement screens. == Changelog == = 1.0.2 = * Connect from inside WordPress with your email address and a one-time code, on the Setup screen. Connecting in your browser is still there. * No AccessiBit account yet? Create it, with this site in it, while connecting. * The site's domain is verified from WordPress right after connecting, or with **Verify from this site**, when WordPress is at the root of its domain. * The Setup screen shows what your plan includes for the widget, the statement and the Tracker. * The Setup and Accessibility screens now look and behave like the Widget and Statement ones. Where the script cannot run, the earlier screens are shown. = 1.0.1 = * Customize the widget from WordPress, on the new **AccessiBit → Widget** screen, and try it on your own homepage before saving: the Tools tab previews it with your unsaved changes. * Write, publish and download your accessibility statement from WordPress, on the new **AccessiBit → Statement** screen. * Show your statement on any page with the new **Accessibility statement** block or the `[accessibit_statement]` shortcode. * Connect to AccessiBit in one click — sign in and approve in AccessiBit, with no API key to copy. The key AccessiBit issues is valid for this site only. * Sites connected with an API key pasted into an earlier version need to press **Reconnect** on the Setup screen once before they can edit the widget or the statement here: that key covers your whole AccessiBit account, and can no longer change a site. Reconnecting does not revoke the old key; if nothing else uses it, revoke it on the API keys page in AccessiBit. * Disconnecting, or deleting the plugin, now revokes that key in AccessiBit instead of only forgetting it here. Disconnect says when a key could not be revoked, such as an API key pasted into an earlier version. * The source code of the Widget and Statement screens ships with the plugin, in `admin/bundle/source/`. = 1.0.0 = * First release. * Connect a site to AccessiBit with an API key. * One free accessibility scan of your homepage when you connect, with a preview of the issues found. * Switch the accessibility widget on and off. * See the score of your site's latest full audit, if it has one. * Links into the AccessiBit dashboard to customize the widget, write your accessibility statement, scan the rest of your site, and buy a plan. * Admin screens in English, Italian and Spanish. == External services == This plugin connects to AccessiBit services, as follows. When you choose to connect in your browser, your own browser goes to AccessiBit: * app.accessibit.com — you are sent there to sign in and approve the connection. This site's address travels in that link, so AccessiBit can show you which site you are connecting and send you back here afterwards. This is a page you open, not a request the plugin makes, and nothing happens until you click Connect. Requests made from your WordPress admin, by the plugin itself: * api.accessibit.com — when you press Send code, this site asks AccessiBit to email a one-time code. The email address you entered and this site's address are sent, with the language of your WordPress admin for the email. AccessiBit, through its email provider, sends the code to that address whether or not it has an account. Nothing is sent before you press the button. * api.accessibit.com — when you type the code, this site sends it with the same email address and this site's address, and receives a key for this site. If the address has no AccessiBit account, the name and company name you then enter are sent too, with your agreement to AccessiBit's terms, to create the account; AccessiBit keeps the email address as a contact of that account. The key is returned to your server and never passes through your browser. * api.accessibit.com — to verify the site's domain, right after connecting or when you press Verify from this site, this site asks AccessiBit for a one-time challenge and then asks it to check the answer. Only the key and the site's AccessiBit ID are sent. AccessiBit's servers then request one address on your site, `/?rest_route=/accessibit/v1/verification`, as any visitor could; for the two minutes at most that a check lasts it answers with a fingerprint of the challenge, and with nothing at any other time. It never reveals the key or anything about your site. * api.accessibit.com — immediately after you approve, this site asks AccessiBit to turn the one-time approval into a key for this site. This site's address is sent with it, so AccessiBit can check the approval was for this site. The key is returned to your server and never passes through your browser. * api.accessibit.com — to read scan summaries and your account details. The key is sent to authenticate, along with the plugin's version; the target site is identified by its AccessiBit site ID. Your WordPress site address is not sent in these requests. * api.accessibit.com — when you disconnect, or delete the plugin, this site asks AccessiBit to revoke the key. Only the key itself is sent. * api.accessibit.com — when you open the Widget or Statement screen, to read and save the widget's settings and your accessibility statement, to preview the statement, and to fetch a download link for it. These calls go from your server, which adds the key; your browser only talks to your own WordPress. What is sent is what you entered on those screens, including the names and contact address you write into the statement. Where the statement has no contact name or email address yet, the Statement screen fills them in with your WordPress display name and email address, and sends them with its preview as soon as the screen opens, before you have changed or saved anything. The target site is identified by its AccessiBit site ID. When you download the statement, your browser opens that link: a short-lived address of the file in AccessiBit's storage at Amazon Web Services (amazonaws.com). * api.accessibit.com — when a page holding the Accessibility statement block or the `[accessibit_statement]` shortcode is viewed and the plugin does not yet know of a published statement, your server asks AccessiBit for it, at most once every fifteen minutes, so a statement published from the AccessiBit dashboard appears without opening the Statement screen. The key is sent to authenticate; nothing about the visitor is sent. * api.accessibit.com — immediately after you connect, the plugin asks AccessiBit to run one free accessibility scan of your homepage, and then reads the result to show it here. AccessiBit requests your homepage from its own servers, as any visitor would, using the address registered for this site in your AccessiBit account. This happens only after you click Connect, and only for a site address whose domain you have verified in AccessiBit. It is one scan per site address: reconnecting or reinstalling the plugin shows you the stored result rather than scanning again. If a scan fails, the Accessibility screen offers a Try again button, because a failure is not a result; it can be used a small number of times and not immediately after a failure. Nothing retries on its own. Requests made from your own browser, on the Widget screen's Tools tab: * cdn.accessibit.com — the tab shows your homepage in a frame with the widget in preview mode, so your browser loads the widget script from AccessiBit's CDN there, whether or not the widget is switched on. In preview mode the widget sends nothing to AccessiBit: it shows the settings on your screen, counts no page view and checks no licence. Requests made from your visitors' browsers, and only if you switch the widget on: * cdn.accessibit.com — serves the accessibility widget script, and its published appearance settings, to your site's front end. * api.accessibit.com — the widget script contacts AccessiBit to check that your account licenses it, and to count usage. It sends your AccessiBit account name and your site's domain, once when it loads and once per page a visitor views. No cookies are sent and no visitor is identified. * api.accessibit.com — if a visitor opens the widget's page-summary feature, the widget sends your site's domain and the readable text of the page the visitor is on, so AccessiBit can summarise it. This happens only on that visitor's request, never automatically. Requests made from your visitors' browsers, and only on a page where you placed the Accessibility statement block or the `[accessibit_statement]` shortcode, once the statement is published: * api.accessibit.com — the visitor's browser loads your published statement in a frame from AccessiBit, which picks the language from the browser's preferred languages, and then from cdn.accessibit.com, where the published statement is stored. The frame is loaded with no referrer, so the address of your page is not sent. No visitor is identified. Links the plugin shows you, which contact nothing until you click them: * app.accessibit.com — the AccessiBit dashboard. The plugin's screens link out to it to scan the rest of your site and buy a plan. These are ordinary links in your browser: no request is made and nothing is sent to AccessiBit unless you follow one. The plugin's own requests carry the WordPress locale of the administrator reading the screen (for example `it_IT`). This is a language tag, not your site address. Your site address travels only where it is listed above: in the Connect link you follow, in the request that redeems the approval, and in the two requests that send and redeem an emailed code. The scan findings themselves come back in Italian, whatever that locale says, and the plugin marks them up as Italian so a screen reader pronounces them correctly; the WCAG reference beside each one is in English. The plugin's own screens are translated. AccessiBit's terms of service: https://www.accessibit.com/eula AccessiBit's privacy policy: https://www.accessibit.com/legal/privacy == Source code == The Setup, Accessibility, Widget and Statement screens are a compiled, minified script, `admin/bundle/accessibit-admin.js`, with its stylesheet. Their complete source code is in the plugin itself, in `admin/bundle/source/`: the bundle in each release is built from that source, with the direct dependencies pinned in its `package.json` to the versions the shipped bundle used. Their own dependencies are resolved afresh, so a rebuild is equivalent rather than byte-identical. To build it yourself, with Node.js 22 or later: `cd admin/bundle/source/packages/site-admin && npm install && npm run build:wp` `admin/bundle/source/README.md` describes the layout. The source is licensed GPLv2 or later, like the rest of the plugin; the third-party packages compiled into the script are listed, with their licences, in `admin/bundle/THIRD-PARTY-NOTICES.txt`.