The AChecker integration module uses the webservice API from AChecker (http://achecker.ca) to submit nodes for validation against one or many chosen accessibility guidelines.

In addition to the usual automated validation, AChecker will flag both likely and potential problems that only a human can make judgement (whilst giving criteria to make such decision).

Here at Nomensa we have been granted time in our schedule to work on contributing modules to the Drupal community. As we have accessibility at heart our first choice was to look into contributing modules that could raise the standard of accessibility across Drupal.

Currently the basic functionality is as follows:
- Allows nodes to be submitted for validation from the content page (/admin/content)
- Allows selection one or many accessibility guidelines for validation
- Lists all errors, likely and potential problems (/admin/reports/achecker)
- Records human judgement of all likely and potential problems

Project page:
https://drupal.org/sandbox/andystone78/2146633

Clone repo here:
git clone git.drupal.org:sandbox/andystone78/2146633.git

Reviews of other projects:
https://drupal.org/comment/8286211#comment-8286211
https://drupal.org/comment/8286491#comment-8286491
https://drupal.org/comment/8286821#comment-8286821
https://drupal.org/comment/8315443#comment-8315443
https://drupal.org/comment/8315493#comment-8315493
https://drupal.org/comment/8315893#comment-8315893
https://drupal.org/comment/8315917#comment-8315917

Comments

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

ram4nd’s picture

Pre-define $form in achecker_integration_admin_settings_form as it might give notices in some cases.

andystone78’s picture

@ram4nd

Thank you for your review.

Would you be able to clarify the 'some cases' aspect of your review?

I have checked against some functions in D7 core equivalent to achecker_integration_admin_settings_form such as user_register_form, taxonomy_form_vocabulary and search_admin_settings, where $form is not pre-defined ($form in all cases is the first argument of the function).

I have also referred to the example documentation on Drupal.org (https://api.drupal.org/api/examples/form_example!form_example_tutorial.i...) which also does not predefine $form.

Kind regards

ram4nd’s picture

Ok sure but yours is achecker_integration_admin_settings_form($form_state).

But the examples you brought up would be achecker_integration_admin_settings_form($form, &$form_state)

andystone78’s picture

@ram4nd

Thank you for replying and clarifying the error in the form function.

This has now been resolved and committed.

Kind regards

andystone78’s picture

Issue summary: View changes
andystone78’s picture

Issue summary: View changes
andystone78’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
michel_v’s picture

Hi Andy

I've gone through the module code, discovered a few minor issues:

1. Even though the README says "This module allows the submission of nodes to the ACHecker validation API via
a node operation on the content page" I couldn't find the option, until disabled the administration_views module. Perhaps this could be highlighted in the README.txt?

2. Didn't seem to get any feedback when I actually performed an Achecker integration scan on my content. There was also no link to the reporting page where I did find the results of the scan. The scan should display a message with the results, from within which you should be able to go to the results page.

3. The links on the error descriptions such as Document does not validate don't work
http://achecker.ca/checkacc.php/checker/suggestion.php?id=232 isn't a valid url

4. The instructions for the tinyMCE plugin says

Extract the archive from ATtutor

There are actually 2 libraries on that page, and you need the second one, the tinyMCE plugin. Also requires WYSIWYG tinyMCE library to be present. Perhaps have a requirement for that itself?

5. Requirements hook doesnt work, still gives an error on the status report page even if you have a valid webservice id. This is probably due to

6. achecker_integration.install
line 58 - $webservice_id = variable_get('achecker_integration_webservice_id2', '');
I think you may have misspelled the variable name, as everything else uses variable_get('achecker_integration_webservice_id', '');

Apart from that the code looks fine.

Thanks

Michel

andystone78’s picture

Thank you Michel for your review.

  1. I have updated the README to highlight the potential issues of overriding the /admin/content page.
  2. I have added a drupal_set_message after nodes are submitted for scanning, this includes the quantity scanned, errors encountered and location of results (if you have permission to view them).
  3. This was a problem with the default value on the settings form, now fixed (as you have already submitted this form you will need to un-install & reinstall the module to see effect).
  4. I have made clearer the instructions for obtaining the required library, the requirement for the tinyMCE library was already present.
  5. Corrected typo in hook_requirements as you correctly diagnosed.

Regards

Andy

alastc’s picture

Hi Andy

Thank you for your module, I have noted a few possible improvements:

In your settings form, achecker_integration_admin_settings_form, you have a field called achecker_integration_webservice_url. This field currently has no validation but some aspects of validation could easily be added (such as using parse_url() to check for a valid url).

In function achecker_integration_scan, you have a watchdog error for DOMDocument, it may be useful to add a link to the PHP DOMDocument page here. Similarly when you watchdog for a failed REST request maybe a link to the settings page would be helpful.

Best of luck with your module,

Alastair

andystone78’s picture

Thank you Alastair for taking the time to review the module.

I have added validation to the field achecker_integration_webservice_url, in addition validation to field achecker_integration_webservice_id has been added.

Also, I have now included watchdog links to DOMDocument documentation and achecker_integration settings page respectively.

All committed to git.

Kind regards

Andy

klausi’s picture

Assigned: andystone78 » misc
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:

  1. achecker_integration_scan(): class_exists('DOMDocument') should be done in hook_requirements() once, not here.
  2. achecker_integration_scan(): what is the $session parameter? Please add @param docs.
  3. achecker_integration_wysiwyg_wysiwyg_plugin(): hard-coding sites/all/libraries could be a problem for distributions that use something like "profiles/recruiter/libraries", right?

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to MiSc as he might have time to take a final look at this.

andystone78’s picture

Thank you klausi.

1) DOMDocument check moved to hook_requirements().
2) @param added to the docblock of achecker_integration_scan(), explaining the purpose of the $session parameter.
3) Hard coding of library path replaced with Drupal function.

All committed to git.

Kind regards

Andy

andystone78’s picture

Issue summary: View changes
andystone78’s picture

Issue summary: View changes
andystone78’s picture

Issue summary: View changes
andystone78’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, andystone78!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

andystone78’s picture

Thank you klausi and all reviewers.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.