Plugin Directory

Changeset 3316068


Ignore:
Timestamp:
06/23/2025 04:18:01 AM (9 months ago)
Author:
cookieyesdev
Message:

3.0.0 - Introduced Accessibility Widgets
New improved UI

Location:
accessibility-widget
Files:
85 added
5 edited

Legend:

Unmodified
Added
Removed
  • accessibility-widget/trunk/accessibility-widget.php

    r3058707 r3316068  
    11<?php
     2
     3/**
     4 * The plugin bootstrap file
     5 *
     6 * This file is read by WordPress to generate the plugin information in the plugin
     7 * admin area. This file also includes all of the dependencies used by the plugin,
     8 * registers the activation and deactivation functions, and defines a function
     9 * that starts the plugin.
     10 *
     11 * @link              https://www.cookieyes.com/
     12 * @since             1.6.6
     13 * @package           AccessibilityWidget
     14 *
     15 * @wordpress-plugin
     16 * Plugin Name:       AccessYes Accessibility Widget for ADA, EAA & WCAG Readiness
     17 * Plugin URI:        https://www.cookieyes.com/accessibility-widget/
     18 * Description:       A simple way to make your website more accessible.
     19 * Version:           3.0.0
     20 * Author:            CookieYes
     21 * Author URI:        https://www.cookieyes.com/
     22 * License:           GPLv3
     23 * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
     24 * Text Domain:       accessibility-widget
     25 */
     26
    227/*
    3 * Plugin Name: Accessibility Widget
    4 * Plugin URI: http://webgrrrl.net/archives/accessibility-widget-revived.htm
    5 * Description: Enlarge text on your WP site with this widget. Revived plugin from tripcastradio.com.
    6 * Author: Lorna Timbah (webgrrrl)
    7 * Version: 2.2.1
    8 * Author URI: https://webgrrrl.net
     28    Copyright 2025  AccessibilityWidget
     29
     30    This program is free software; you can redistribute it and/or modify
     31    it under the terms of the GNU General Public License, version 2, as
     32    published by the Free Software Foundation.
     33
     34    This program is distributed in the hope that it will be useful,
     35    but WITHOUT ANY WARRANTY; without even the implied warranty of
     36    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     37    GNU General Public License for more details.
     38
     39    You should have received a copy of the GNU General Public License
     40    along with this program; if not, write to the Free Software
     41    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    942*/
    10 class widget_accesstxt extends WP_Widget {
    11   /** constructor */
    12   function __construct() {
    13     parent::__construct(false, $name = 'Accessibility Widget');
    14   }
    15   /** @see WP_Widget::widget */
    16   function widget($args, $instance) {
    17     extract( $args );
    18     $title = apply_filters('widget_title', $instance['title']);
    19     $tags = str_replace(" ", "", $instance['tags']); // remove whitespaces
    20     $fontsize = str_replace(" ", "", $instance['fontsize']); // remove whitespaces
    21     $afontsize = explode(",", $fontsize); // transform into arrays
    22     $controls = explode(",", str_replace(" ", "", $instance['controls'])); // remove whitespaces then transform into arrays
    23     $tips = explode(",", $instance['tips']); // transform into arrays
    2443
    25     echo $before_widget;
    26     if ( $title ) echo $before_title . $title . $after_title;
    27     ?>
    28     <script type="text/javascript">
    29         //Specify affected tags. Add or remove from list
    30         var tgs = new Array(<?php echo "'" . str_replace(",", "','", $tags) . "'"; ?>);
    31         //Specify spectrum of different font sizes
    32         var szs = new Array(<?php echo "'" . str_replace(",", "','", $fontsize) . "'"; ?>);
    33         var startSz = 2;
    34         function ts( trgt,inc ) {
    35             if (!document.getElementById) return
    36             var d = document,cEl = null,sz = startSz,i,j,cTags;
    37             sz = inc;
    38             if ( sz < 0 ) sz = 0;
    39             if ( sz > 6 ) sz = 6;
    40             startSz = sz;
    41             if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
    42             cEl.style.fontSize = szs[ sz ];
    43             for ( i = 0 ; i < tgs.length ; i++ ) {
    44                 cTags = cEl.getElementsByTagName( tgs[ i ] );
    45                 for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
    46             }
    47         }
    48         </script>
    49     <ul>
    50       <li><?php
    51       $controlscount = count($controls);
    52       foreach ($afontsize as $key => $value) {
    53         $icontrols = ($controlscount > 1 ? $key : 0);
    54         echo "<a href=\"javascript:ts('body'," . $key . ")\" style=\"font-size:" . $value . "\" title=\"" . $tips[$icontrols] . "\">" . $controls[$icontrols] . "</a>&nbsp;&nbsp;";
    55       }
    56       ?></li>
    57     </ul>
    58     <?php echo $after_widget; ?>
    59     <?php
    60   }
    61   /** @see WP_Widget::update -- do not rename this */
    62   function update($new_instance, $old_instance) {
    63         $instance = $old_instance;
    64         $instance['title'] = strip_tags(esc_attr($new_instance['title']));
    65         $instance['tags'] = strip_tags(esc_attr($new_instance['tags']));
    66         $instance['fontsize'] = strip_tags(esc_attr($new_instance['fontsize']));
    67         $instance['controls'] = strip_tags(esc_attr($new_instance['controls']));
    68         $instance['tips'] = strip_tags(esc_attr($new_instance['tips']));
    69     return $instance;
    70   }
    71   /** @see WP_Widget::form -- do not rename this */
    72   function form($instance) {
    73     $str_default = "90%, 100%, 110%, 120%";
    74     $title = strip_tags(esc_attr($instance['title']));
    75     $tags = ($instance['tags'] == "" ? "body,p,li,td" : strip_tags(esc_attr($instance['tags'])));
    76     $fontsize = ($instance['fontsize'] == "" ? $str_default : strip_tags(esc_attr($instance['fontsize'])));
    77     $controls = ($instance['controls'] == "" ? $str_default : strip_tags(esc_attr($instance['controls'])));
    78     $tips = ($instance['tips'] == "" ? $str_default : strip_tags(esc_attr($instance['tips'])));
    79   ?>
    80   <p>
    81     <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'accessibility-widget'); ?></label>
    82     <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
    83   </p>
    84   <p>
    85     <label for="<?php echo $this->get_field_id('tags'); ?>"><?php _e('Resize the following HTML/CSS tags (separate with a comma (,)):', 'accessibility-widget'); ?></label>
    86     <input class="widefat" id="<?php echo $this->get_field_id('tags'); ?>" name="<?php echo $this->get_field_name('tags'); ?>" type="text" value="<?php echo $tags; ?>" /><br />
    87   </p>
    88   <p>
    89     <label for="<?php echo $this->get_field_id('fontsize'); ?>"><?php _e('Set to these sizes (separate with a comma (,)):', 'accessibility-widget'); ?></label>
    90     <input class="widefat" id="<?php echo $this->get_field_id('fontsize'); ?>" name="<?php echo $this->get_field_name('fontsize'); ?>" type="text" value="<?php echo $fontsize; ?>" /><br />
    91   </p>
    92   <p>
    93     <label for="<?php echo $this->get_field_id('controls'); ?>"><?php _e('Set controller text (separate with a comma (,)):', 'accessibility-widget'); ?></label>
    94     <input class="widefat" id="<?php echo $this->get_field_id('controls'); ?>" name="<?php echo $this->get_field_name('controls'); ?>" type="text" value="<?php echo $controls; ?>" /><br />
    95   </p>
    96   <p>
    97     <label for="<?php echo $this->get_field_id('tips'); ?>"><?php _e('Set tooltip text on mouse hover (separate with a comma (,)):', 'accessibility-widget'); ?></label>
    98     <input class="widefat" id="<?php echo $this->get_field_id('tips'); ?>" name="<?php echo $this->get_field_name('tips'); ?>" type="text" value="<?php echo $tips; ?>" /><br />
    99   </p>
    100   <?php
    101   }
    102 } // end class widget_accesstxt
     44// If this file is called directly, abort.
     45if ( ! defined( 'WPINC' ) ) {
     46    die;
     47}
    10348
    104 if ( ! version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {
    105     $initValue = create_function('', 'return register_widget("widget_accesstxt");');
     49define( 'CY_A11Y_VERSION', '3.0.0' );
     50define( 'CY_A11Y_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
     51define( 'CY_A11Y_PLUGIN_BASEPATH', plugin_dir_path( __FILE__ ) );
     52// Previous version settings (deprecated from 0.9 onwards).
     53define( 'CY_A11Y_PLUGIN_FILENAME', __FILE__ );
     54define( 'CY_A11Y_DEFAULT_LANGUAGE', cya11y_set_default_language() );
     55
     56
     57function cya11y_set_default_language() {
     58    $default = get_option( 'WPLANG', 'en_US' );
     59    if ( empty( $default ) || strlen( $default ) <= 1 ) {
     60        $default = 'en';
     61    }
     62    return substr( $default, 0, 2 );
     63}
     64
     65/**
     66 * Check if plugin is in legacy version.
     67 *
     68 * @return boolean
     69 */
     70function cya11y_is_legacy() {
     71    if ( empty( get_option( 'cya11y_widget_settings', array() ) ) && ! empty( get_option( 'widget_accesstxt', '' ) ) ) {
     72        return true;
     73    } else {
     74        return false;
     75    }
     76}
     77
     78if ( cya11y_is_legacy() ) {
     79    require_once CY_A11Y_PLUGIN_BASEPATH . 'legacy/loader.php';
    10680} else {
    107     $initValue = function() {
    108     return register_widget( 'widget_accesstxt' );
    109     };
     81    require_once CY_A11Y_PLUGIN_BASEPATH . 'lite/loader.php';
    11082}
    111 add_action( 'widgets_init', $initValue );
  • accessibility-widget/trunk/readme.txt

    r3310970 r3316068  
    1 === Accessibility Widget ===
    2 Contributors: webgrrrl, cookieyesdev
    3 Tags: accessibility, widget, formatting, style, wcag
    4 Requires at least: 4.6
    5 Tested up to: 6.6
    6 Stable tag: 2.2.1
     1=== AccessYes Accessibility Widget for ADA, EAA & WCAG Readiness ===
     2Contributors: cookieyesdev
     3Donate link: https://www.cookieyes.com/
     4Tags: web accessibility, wp accessibility, accessibility widget, wcag, ada
     5Requires at least: 5.0.0
     6Tested up to: 6.8
     7Requires PHP: 5.6
     8Stable tag: 3.0.0
    79License: GPLv2 or later
    810License URI: http://www.gnu.org/licenses/gpl-2.0.html
    911
    10 Changes WP site text sizes. Go to the Widget settings and Save after each update.
     12All-in-one WP accessibility widget to meet WCAG, ADA, EAA, and GDPR standards with text resize, color contrast, dyslexia font, and more for WordPress web accessibility.
     13
     14== Description ==
     15
     16Accessibility Widget is a lightweight, user-friendly plugin that adds a powerful accessibility widget to your WordPress website. Designed to meet the highest accessibility standards, this widget helps your site align with major accessibility regulations like **WCAG**, **ADA**, **EAA**, and **EN 301 549**. It’s also fully **GDPR compliant** as it collects no personal data of users.
     17
     18With over **50+ language options** and a comprehensive range of visual and behavioral adjustments, the Accessibility Widget ensures that all users — including those with disabilities — can access your site comfortably and confidently.
     19
     20Whether you need to support users with dyslexia, cognitive disabilities, or visual impairments, this plugin offers the tools you need to make your website inclusive.
     21
     22Disclaimer:
     23This plugin is intended to support your accessibility efforts. It does not guarantee legal compliance with ADA, WCAG, EAA, EN 301 549 or other standards. For full compliance, a comprehensive audit and remediation may still be required.
     24
     25== Key Features ==
     26
     27= 🌐 Multilingual Support =
     28* Supports over 50 languages
     29* Language can be switched from the dropdown within the widget
     30
     31= 🖋️ Content Adjustments =
     32* **Adjust Font Size** – Zoom in or out to suit user preference
     33* **Highlight Titles** – Emphasize headings for easier reading
     34* **Highlight Links** – Visually identify all clickable links
     35* **Dyslexia Font** – Enable a typeface designed for easier reading by users with dyslexia
     36* **Letter Spacing** – Increase or decrease spacing between characters
     37* **Line Height** – Customize the vertical spacing between lines
     38* **Font Weight** – Switch to bold text for improved visibility
     39
     40= 🎨 Color and Contrast Controls =
     41Make visual adjustments instantly:
     42**Dark Contrast**
     43**Light Contrast**
     44**High Contrast**
     45**High Saturation**
     46**Low Saturation**
     47**Monochrome**
     48
     49= 🛠️ Assistive Tools =
     50* **Reading Guide** – Focuses on one line at a time for easier tracking
     51* **Stop Animations** – Disables animations and motion effects to reduce distractions
     52* **Big Cursor** – Enlarges the mouse pointer for better visibility
     53* **Reset Settings** – Instantly revert all changes back to default
     54
     55= ✅ Compliance Focused =
     56Helps your website align with:
     57* WCAG (Web Content Accessibility Guidelines)
     58* ADA (Americans with Disabilities Act)
     59* EAA (European Accessibility Act)
     60* EN 301 549 (European ICT Accessibility Standard)
     61* 100% GDPR compliant – no personal data collected or stored
    1162
    1263== Installation ==
    1364
    14 1. In your WordPress dashboard, select Plugins / Add.
    15 1. Search for Accessibility Widget, and select Install.
    16 1. Go to Appearances / Widgets.
    17 1. Add the Accessibility Widget block to your widget area and select Update.
     651. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
     662. Activate the plugin through the 'Plugins' screen in WordPress.
     673. The Accessibility Widget will appear automatically on your site. No setup required.
    1868
    1969== Frequently Asked Questions ==
    2070
    21 = How do I use this plugin? =
     71= Does this plugin help with accessibility law compliance? =
     72Yes. It is designed to support compliance with WCAG, ADA, EAA, and EN 301 549 standards.
    2273
    23 Once you complete installation, below are options you can set in the widget:-
     74= Is user data collected by the plugin? =
     75No. The plugin does not track or store any user data, ensuring GDPR compliance.
    2476
    25 *Resize the following HTML/CSS tags:*
    26 Specify all the HTML or CSS tags you want to resize in this section. By default, the HTML tag body, p, li and td is set.
    27 Different WordPress theme may have different and unique stylesheet classes and IDs. You can switch on your browser's built-in Developer Tools and use the Inspect Element option to detect what HTML/CSS codes to use.
     77= Can users reset the settings they applied? =
     78Yes. A "Reset Settings" button is provided to quickly revert all changes.
    2879
    29 *Set to these sizes:*
    30 This is where you set the font-size you want to enable for the users to use (read up on the CSS font-size property at W3Schools). The simplest font-size group you can use are smaller, inherit, larger. By default, the size are set as 90%, 100%, 110%, and 120%.
     80= Can the plugin be used on multilingual websites? =
     81Absolutely. The plugin supports over 50 languages and adapts based on the selected language.
    3182
    32 *Set controller text:*
    33 By default, the widget displays the letter "T" depending on the number of font sizes you use; that is, if you set only two font-size, then only two letter T appears, and so forth. Starting with version 1.2, you can set it to use more meaningful words, like Small, Normal, Large for each size you specify. By default, the controller texts are set as 90%, 100%, 110%, and 120%.
     83== Screenshots ==
    3484
    35 *Set tooltip text:*
    36 By default, the widget displays the letter "T" depending on the number of font sizes you use; that is, if you set only two font-size, then only two letter T appears, and so forth. Starting with version 1.2, you can set it to use more meaningful words, like Small, Normal, Large for each size you specify. By default, the tooltip texts are set as 90%, 100%, 110%, and 120%.
     851. Content Adjustments
     862. Customise Options
     873. Assistive Tools
    3788
    3889== Changelog ==
    3990
    40 Changelog has been moved to the Plugin Homepage: https://z.webgrrrl.net/le.
     91= 3.0.0 =
     92
     93[Compatibility] - Tested OK with WordPress version 6.8
     94[Enhancement] - Added accessibility widget
     95[Enhancement] - New improved UI
     96
     97== Upgrade Notice ==
     98
     99= 3.0.0 =
     100
     101[Compatibility] - Tested OK with WordPress version 6.8
     102[Enhancement] - Added accessibility widget
     103[Enhancement] - New improved UI
Note: See TracChangeset for help on using the changeset viewer.