marcus

ProcessWire Accessibility Tools

Recommended Posts

Hi y'all! Long time no see. Here's a little module aiming to help you build accessible websites

ProcessWire Accessibility Tools

Download: http://modules.processwire.com/modules/pwat/

Github: https://github.com/marcus-herrmann/PWAT

A small, but hopefully growing toolkit for creating accessible ProcessWire sites. Right now it consists of the following little helpers:

  • tota11y visualization toolkit by Khan Academy
  • A toggle button to see view site in grayscale. The w3c recommends checking your page without colours to see if your design still works (accompanied by a colours contrast check, which is part of tota11y)
  • A link to test your webpage with WAVE, webaim's Web Accessibility eValuation Tool. By the nature of this tool, the website under test must be available online, local hosts won't work.

tota11y menu opened Grayscale active

Installation

Once you have downloaded PWAT, go to your module Install page and click "Check for new modules". Find "ProcessWire Accessibility Tools" and click "Install". During installation, PWAT creates a new role 'pwat_user'. To use the Accessibility Tools, you have to grant user this role.

Following, you can start configuring the module.

PWAT config page

Usage

PWAT starts with only the tota11y script activated. On the configuration page you can decide

  • whether PWAT is visible on admin pages
  • if tota11y is active
  • if the grayscale toggle is active
  • if the link to WAVE will be visible

PWAT config page

Credits


Best,

marcus
 

  • Like 22

Share this post


Link to post
Share on other sites

Looks really promising!

Share this post


Link to post
Share on other sites
On 5.1.2018 at 7:14 PM, dragan said:

Don't know if you heard about it: There's a great CKEditor plugin called Accessibility Checker: https://ckeditor.com/ckeditor-4/accessibility-checker/

I have started to include it in every new PW installation and tell clients about it. Perhaps there's a way to include this as well?

That's a really great tool I never heard of, thanks for mentioning it, but I have no idea how to include it to PWAT (except maybe a reminder / link on the module settings page)

  • Like 1

Share this post


Link to post
Share on other sites
On 5.1.2018 at 7:14 PM, dragan said:

Don't know if you heard about it: There's a great CKEditor plugin called Accessibility Checker: https://ckeditor.com/ckeditor-4/accessibility-checker/

I have started to include it in every new PW installation and tell clients about it. Perhaps there's a way to include this as well?

 

13 hours ago, marcus said:

That's a really great tool I never heard of, thanks for mentioning it, but I have no idea how to include it to PWAT (except maybe a reminder / link on the module settings page)

But maybe this CKE-plugin is an addition for AOS? @tpr

If tpr adds it, @marcus you may only check if AOS is installed (incl. the min version this plugin gets added) and displays a reminder.

Share this post


Link to post
Share on other sites

I dont know if I miss something, but the module only works in backend in my case. I have checked the loading of the js files in the frontend, but they are not there, if I am logged in as superuser. Is there something else that I have to do?

Share this post


Link to post
Share on other sites

This is odd. Usually, PWAT showing in the backend proofs that everything is fine (= your user has the needed role). Have you tried to clear compiled files (on the bottom of your Modules › Site)? Since the modules only does a very simple Page hook I strongly believe your experience has something to do with caching

  • Thanks 1

Share this post


Link to post
Share on other sites

No, unfortunately not. The module cache is not responsible, also not the template cache. I have a lot of custom hooks inside my ready.php. Maybe one of them interferes with your code and prevents the adding of the js file. If no one other has to deal with this problem so it must be on my side.

Its not a relevant issue for me at the moment. I guess I will find the reason - some day, some time ^-^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By BitPoet
      Since I was stuck to my flat today I took up a wish and rolled a Process module / CKEditor plugin combo that adds @-autocomplete like the mentions here in the forum to CKEditor fields. It's configurable, but only in module settings for now, the positioning of the select list is quite off and there's still some visual work to be done, so it is in early alpha state.
      Nonetheless, if you want to take a look, here it is:
      https://github.com/BitPoet/ProcessMention

       
      After installation, you may want to look into the "Additional selector" entry in the module's settings. You will most likely want to limit results to certain templates there.
       
      Edit: Updated to version 0.0.30 with fixed positioning of the dropdown.
      Edit2: Settings are configurable in field context now. If pwmentions is enabled, the according settings are shown on the "Input" tab.
       
    • By thuijzer
      https://github.com/thuijzer/processwire-FieldtypeBusinessHours
      Fieldtype Business Hours
      ProcessWire Fieldtype for entering business hours (opening hours)
       
      Input format
      Leave a day empty when closed on that day
      Times are in 24 hour format.
      9:00-12:00 9:00-12:00, 13:00-17:30 16:00-2:00  
      Usage in templates
      Days are from 1 to 7 where 1 is Monday and 7 is Sunday (ISO-8601)
      echo $page->field_name->isNowOpen() ? 'Now open' : 'Now closed'; if($page->field_name[1] == null) { echo 'Closed on Monday'; } if($page->field_name[2]->inRange('11:00')) { echo 'Tuesday at 11:00 open'; } echo $page->field_name[1]; echo $page->field_name[1]->getEntries()->getFrom()->format('H:i');  
    • By hellomoto
      I was working on this:
      class PWCRM extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Client Relationship Management', 'version' => .001, 'singular' => true, 'autoload' => true ); } public function init() {} public function ready() { $this->pages->addHookBefore('render', $this, 'accessHook'); $this->pages->addHookAfter('render', $this, 'hookAfterPageRender'); } public function accessHook(HookEvent $event) { $page = $this->wire('page'); if (!strpos($page->template->tags, 'crm')) return; if (!$this->wire('user')->hasRole('crm')) $this->wire('session')->redirect($this->wire('config')->urls->login);//throw new Wire404Exception(); } public function hookAfterPageRender(HookEvent $event) { $page = $event->object; echo $page->template->tags; if (!strpos($page->template->tags, 'crm')) return; echo $this->wire('config')->urls->templates; include_once($this->wire('config')->urls->templates.'functions.inc'); $pagehtml = $event->return; $pagehtml = str_replace( '</head>', '<link id="css_crm" rel="stylesheet" href="'.$this->wire('config')->urls->templates.'css/crm.css"> </head>', $pagehtml ); $event->return = $pagehtml; //$event->replace = true; } } I have tried placing the hooks into the init() function, and more... Neither method is effective. The echoes now output, but no redirection (although I have the access settings for the top-level template for this set to render a 404 for underprivileged users, which it does, overriding this, but nonetheless this should work aside from that.
      Then I wrote this up quick:
      <?php namespace ProcessWire; class MaintenanceMode extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Maintenance Mode', 'version' => 1, 'summary' => 'Disables the website frontend for non-superusers.', 'singular' => true, 'autoload' => true, 'permanent' => false ); } public function init() { $this->addHookBefore('Page::render', $this, 'displayDecide'); } public function displayDecide($event) { $page = $event->object; if ($page->template == 'admin' || $this->wire('user')->hasRole('superuser')) return; // replace the method hooked $event->replace = true; $event->return = "Patience please while we undergo some brief maintenance work."; } } which likewise avails nothing. What the hell is my problem here? 
    • By adrian
           Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS
       

       
      Integrates and extends Nette's Tracy debugging tool and adds 30+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.