Change how the accessibility widget looks and which profiles it offers
set_widget_appearanceUse this when the user wants the Inclusify widget on their site to look different — match brand colour, move it off something it covers, change its size or icon — or to change which accessibility PROFILES it offers visitors. WRITES to this website's Inclusify configuration, never to the site's code or theme: it changes what the widget bundle renders. Takes effect within about a minute; the edge cache is purged as part of the change. Every setting is optional and anything you leave out is left exactly as it is, so you can change one without knowing the others. This REQUIRES CONFIRMATION — call without "confirm" first, show the user the preview, then call again with the token once they agree — because the result is visible to that site's real visitors. Removing an accessibility profile is the consequential part: it takes an accommodation away from visitors who may be relying on it, so the preview names each one. Note that "enabledProfiles" is a COMPLETE REPLACEMENT LIST, not an addition — whatever you pass becomes the whole set, so include the ones already on that should stay on. The account owner is emailed a record with a link to undo it. Needs the STARTER plan or above, matching the panel. Shopify-billed stores cannot use this at all — they customise the widget from the Shopify app. To turn the widget off entirely, use set_widget_enabled instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Leave this out on the first call to get a preview of exactly what would change, plus a confirmation token. Call again with the same arguments and that token to apply the change. The token lasts 10 minutes and works once. | |
| website | Yes | The website domain as registered in Inclusify, e.g. "example.com". | |
| language | No | Widget interface language. Anything other than English needs a plan with more than one language. | |
| position | No | Which corner the widget button sits in. | |
| triggerIcon | No | Which icon the button shows. | |
| triggerSize | No | Button size in pixels, 40 to 80. | |
| primaryColor | No | Six-digit hex, e.g. "#0066ff". The widget button and accents use it. | |
| showOnMobile | No | Whether the widget appears on small screens. | |
| enabledProfiles | No | The accessibility profiles offered to visitors, as a complete replacement list — whatever you pass becomes the whole set, so include the ones already on that should stay on. Removing one takes that accommodation away from visitors using it. | |
| triggerElementId | No | The id of an element on the CUSTOMER'S OWN site that opens the widget — usually a footer or menu link they have styled themselves, e.g. "footer-accessibility". On every page where that element exists the floating button is not rendered, so their link becomes the only visible way in; on pages where it is missing the floating button comes back, so the widget is never unreachable. An element id, NOT a CSS selector, and without the leading "#". Pass null to remove it and go back to the floating button. Setting this does not put the element on their site — they add the id to their own theme; if you have not confirmed the element exists, say so rather than assuming. | |
| hideForeverEnabled | No | Whether visitors get a "don't show again" option. Needs the plan that includes it. |