To enhance the accessibility of your website's push notification subscription prompt (often referred to as the 'subscribe widget' or 'popup'), you can add alternative text (ALT text) to its icon. This helps users with screen readers understand the icon's purpose.
Pushwoosh now supports an iconAlt
parameter for this. You can include it in your Pushwoosh.push(['init', { ... }])
configuration, specifically within the subscribeWidget.options
object.
Here's how to use it:
Pushwoosh.push(['init', {
// ... other general initialization options like applicationCode, etc. ...
subscribeWidget: {
enable: true, // Make sure the subscription prompt is enabled
options: {
// ... other customization options for the prompt (e.g., title, text) ...
iconUrl: 'https://your-website.com/path/to/your-icon.png', // The URL for your prompt's icon
iconAlt: 'Descriptive text for your icon (e.g., Company Logo, Notification Bell)', // Add your ALT text here
// ... other options like acceptButtonText, cancelButtonText, etc. ...
}
}
}]);
To implement this:
- Locate your Pushwoosh initialization script on your website.
- Inside the
Pushwoosh.push(['init', { ... }])
call, find thesubscribeWidget
object. - Within
subscribeWidget.options
, add theiconAlt
property alongside youriconUrl
property. - Set the value of
iconAlt
to a concise and meaningful description of the icon
This will ensure that the icon in your subscription prompt is more accessible.
Comments
0 comments
Please sign in to leave a comment.