Quick Menu
Default Installation Script
data-position
data-size
data-language
data-color
data-type
data-statement_text
data-statement_url
data-mobile
data-trigger
data-account
Customized Script Example
Default Installation Script
<script>
(function(d){
var s = d.createElement("script");
/* uncomment the following line to override default position*/
/* s.setAttribute("data-position", 1);*/
/* uncomment the following line to override default size (values: small, large)*/
/* s.setAttribute("data-size", "large");*/
/* uncomment the following line to override default language (e.g., fr, de, es, he, nl, etc.)*/
/* s.setAttribute("data-language", "null");*/
/* uncomment the following line to override color set via widget (e.g., #053f67)*/
/* s.setAttribute("data-color", "#0048FF");*/
/* uncomment the following line to override type set via widget (1=person, 2=chair, 3=eye, 4=text)*/
/* s.setAttribute("data-type", "1");*/
/* s.setAttribute("data-statement_text", "Our Accessibility Statement");*/
/* s.setAttribute("data-statement_url", "http://www.example.com/accessibility");*/
/* uncomment the following line to override support on mobile devices*/
/* s.setAttribute("data-mobile", true);*/
/* uncomment the following line to set custom trigger action for accessibility menu*/
/* s.setAttribute("data-trigger", "triggerId");*/
s.setAttribute("data-account", "PTR1249toR");
s.setAttribute("src", "https://cdn.userway.org/widget.js");
(d.body || d.head).appendChild(s);
})(document)
</script>
data-position
Controls where the accessibility icon appears on the screen.
s.setAttribute("data-position", 1);Value | Position |
| Top Right |
| Middle Right |
| Bottom Right |
| Bottom Middle |
| Bottom Left |
| Middle Left |
| Top Left |
| Top Middle |
-----------------------------------------------------------
| 7 - Top Left 8 - Top Middle 1 - Top Right |
| |
| 6 - Middle Left 2 - Middle Right |
| |
| 5 - Bottom Left 4 - Bottom Middle 3 - Bottom Right |
-----------------------------------------------------------
data-size
Changes the size of the accessibility icon.
s.setAttribute("data-size", "large");Value | Description |
| Standard compact icon |
| Larger icon |
data-language
Forces the widget interface language.
s.setAttribute("data-language", "fr");Code | Language |
| English |
| French |
| German |
| Spanish |
| Hebrew |
| Dutch |
| Portuguese |
data-color
Changes the widget button color.
s.setAttribute("data-color", "#0048FF");Color | HEX |
Blue |
|
Green |
|
Black |
|
Red |
|
data-type
Changes the accessibility icon style.
s.setAttribute("data-type", "1");Value | Icon Type |
| Person |
| Wheelchair |
| Eye |
| Text |
data-statement_text
Defines the custom text shown for the accessibility statement link.
s.setAttribute("data-statement_text", "Our Accessibility Statement");data-statement_url
Defines the URL for the accessibility statement page.
s.setAttribute("data-statement_url", "https://example.com/accessibility");data-mobile
Enables or disables widget support on mobile devices.
s.setAttribute("data-mobile", true);Value | Description |
| Enable widget on mobile |
| Disable widget on mobile |
data-trigger
Uses a custom HTML element to open the accessibility menu instead of the default floating icon.
s.setAttribute("data-trigger", "triggerId");Example HTML trigger:
<button id="triggerId">Accessibility</button>
data-account
Defines the UserWay account ID connected to the widget.
s.setAttribute("data-account", "PTR1249toR");Customized Script Example
<script>
(function(d){
var s = d.createElement("script");
s.setAttribute("data-position", 3);
s.setAttribute("data-size", "large");
s.setAttribute("data-language", "es");
s.setAttribute("data-color", "#0048FF");
s.setAttribute("data-type", "1");
s.setAttribute("data-statement_text", "Accessibility Statement");
s.setAttribute("data-statement_url","https://example.com/accessibility");
s.setAttribute("data-mobile", true);
s.setAttribute("data-account", "PTR1249toR");
s.setAttribute("src", "https://cdn.userway.org/widget.js");
(d.body || d.head).appendChild(s);
})(document)
</script>
Need more help? Contact the UserWay Support Team — we're here to assist you.
Get in touch with UserWay Support.
