diff --git a/.bowerrc b/.bowerrc index 1edc0973b..687b2e00a 100644 --- a/.bowerrc +++ b/.bowerrc @@ -1,3 +1,3 @@ { - "directory": "assets/js/vendor" + "directory": "public/assets/js/vendor" } diff --git a/.buildpacks b/.buildpacks new file mode 100644 index 000000000..6a77caf53 --- /dev/null +++ b/.buildpacks @@ -0,0 +1,2 @@ +https://github.com/heroku/heroku-buildpack-nodejs +https://github.com/heroku/heroku-buildpack-php diff --git a/HEROKU.md b/HEROKU.md new file mode 100644 index 000000000..6352092c7 --- /dev/null +++ b/HEROKU.md @@ -0,0 +1,51 @@ +## Deploy on Heroku + +1. `git clone git@github.com:ucfcdl/UDOIT.git` to grab a copy of the git repo +2. `heroku create` will set up a Heroku project +3. `heroku addons:create heroku-postgresql:hobby-dev` add a database addon +4. `heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi` may be required +5. `git push heroku master:master` will build build the server using our master branch +6. set up the Heroku config variables below + +## Configure +Set Heroku config variables using `heroku config:set VAR=value1` + +* `CONSUMER_KEY` - LTI consumer key entered when adding UDOIT LTI to Canvas +* `SHARED_SECRET` - LTI secret entered when adding UDOIT LTI to Canvas +* `OAUTH2_ID` - from the developer api key created by your admin +* `OAUTH2_KEY` - from the developer api key created by your admin +* `OAUTH2_URI` - full url to your oauth2responce.php - EX: `https://your.herokuapp.com/oauth2response.php` +* `GOOGLE_API_KEY` - add a google api key for youtube video support +* `USE_HEROKU_CONFIG` - set to `true` to enable the Heroku configuration + +## Create Database Tables +You'll need to have postgresql installed on your own system to connect to the Heroku postgresql database. + +* `heroku pg:psql` will open a psql connection to the remote Heroku database +* copy and paste the postgresql table schemeas for the users and reports table into the prompt +* `\dt` will show you a list of the tables you just created +* `\q` quits the psql terminal + +```sql +/* postgresql */ +CREATE TABLE reports ( + id SERIAL PRIMARY KEY, + user_id integer, + course_id integer, + file_path text, + date_run bigint, + errors integer, + suggestions integer +); +``` + +### Users Table + +```sql +/* postgresql */ +CREATE TABLE users ( + id integer CONSTRAINT users_pk PRIMARY KEY, + api_key varchar(255), + date_created integer +); +``` diff --git a/Procfile b/Procfile new file mode 100644 index 000000000..1d2ee486c --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: vendor/bin/heroku-php-apache2 -F phpfpm_custom.conf public/ diff --git a/README.md b/README.md index d9942c137..299aa75ea 100755 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ UDOIT uses the [QUAIL PHP library](https://code.google.com/p/quail-lib/), which ## Installing +UDOIT uses php, apache or nginx, and mysql or postresql. For instructions on installing to Heroku, view [HEROKU.md](HEROKU.md). We also support instantly deploying UDOIT: [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + ### System Requirements *PHP 5.4 is required* to run UDOIT without any modifications. We have not tested it on 5.5 or 5.6, but some users have been able to modify the code to work on 5.3. @@ -66,6 +68,7 @@ There are only two tables required to run UDOIT. They are: ### Reports Table ```sql +/* mysql */ CREATE TABLE `reports` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, @@ -76,11 +79,24 @@ CREATE TABLE `reports` ( `suggestions` int(10) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +/* postgresql */ +CREATE TABLE reports ( + id SERIAL PRIMARY KEY, + user_id integer, + course_id integer, + file_path text, + date_run bigint, + errors integer, + suggestions integer +); ``` + ### Users Table ```sql +/* mysql */ CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL, `api_key` varchar(255) NOT NULL, @@ -88,8 +104,16 @@ CREATE TABLE `users` ( PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +/* postgresql */ +CREATE TABLE users ( + id integer CONSTRAINT users_pk PRIMARY KEY, + api_key varchar(255), + date_created integer +); ``` + ## Configuration Make a copy of `config/localConfig.template.php`, rename it to `localConfig.php`. @@ -110,7 +134,7 @@ UDOIT uses Oauth2 to take actions on behalf of the user, you'll need to [sign up These value of these vars should be obvious: * `$db_host` -* `$db_user` +* `$db_url` * `$db_password` * `$db_name` * `$db_user_table` diff --git a/app.json b/app.json new file mode 100644 index 000000000..9959c63d2 --- /dev/null +++ b/app.json @@ -0,0 +1,60 @@ +{ + "name": "UDOIT", + "description": "The Universal Design Online content Inspection Tool, or UDOIT identifies and fixes accessibility issues in Canvas by Instructure.", + "keywords": [ + "education", + "canvas", + "CDL", + "EDU", + "UCF", + "Instructure", + "508" + ], + "website": "http://online.ucf.edu/teach-online/resources/udoit/", + "repository": "https://github.com/ucfcdl/UDOIT", + "success_url": "/", + "env": { + "CONSUMER_KEY": { + "description": "LTI consumer key entered when adding UDOIT LTI to Canvas", + "generator": "secret" + }, + "SHARED_SECRET": { + "description": "LTI secret entered when adding UDOIT LTI to Canvas", + "generator": "secret" + }, + "OAUTH2_ID": { + "description": "Oauth ID from the developer api key created by your admin", + "generator": "secret" + }, + "OAUTH2_KEY": { + "description": "Oauth Key from the developer api key created by your admin", + "generator": "secret" + }, + "OAUTH2_URI": { + "description": "Full url to your oauth2responce.php file", + "value": "https://your.herokuapp.com/oauth2response.php" + }, + "GOOGLE_API_KEY": { + "description": "add a google api key for youtube video support", + "required": false + }, + "USE_HEROKU_CONFIG": { + "description": "needed to use the Heroku configuration", + "value": "true" + } + }, + "addons": [ + "heroku-postgresql:hobby-dev" + ], + "buildpacks": [ + { + "url": "https://github.com/heroku/heroku-buildpack-nodejs" + }, + { + "url": "https://github.com/heroku/heroku-buildpack-php" + } + ], + "scripts": { + "postdeploy": "php db_pg_setup.php" + } +} \ No newline at end of file diff --git a/composer.json b/composer.json index bf9ea1ce6..ee3e6f2ed 100755 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "repositories": [ ], "require": { - "php": ">=5.4.0", + "php": "^5.4.0 || ^5.5.0 || ^5.6.0", "nategood/httpful": "*", "zaininnari/html-minifier": "dev-master", "mpdf/mpdf": "dev-master", @@ -14,13 +14,11 @@ "ext-pdo": "*" }, "require-dev": { - "symfony/var-dumper": "*" + "symfony/var-dumper": "*", + "heroku/heroku-buildpack-php": "*" }, "scripts": { - "post-install-cmd": [ - "bower install" - ], - "post-update-cmd": [ + "compile": [ "bower install" ] } diff --git a/composer.lock b/composer.lock old mode 100755 new mode 100644 index 5dc16d013..a3173984d --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "279e24152487e695fa54de77461f2a48", - "content-hash": "05c93b4fa9d3879516692dd93f745f68", + "hash": "4ecdb96350cddd6445ab39063bbbcb8c", + "content-hash": "ecb334706b791aa01d6e6870ade3a4c2", "packages": [ { "name": "league/plates", @@ -209,22 +209,126 @@ } ], "packages-dev": [ + { + "name": "heroku/heroku-buildpack-php", + "version": "v90", + "source": { + "type": "git", + "url": "https://github.com/heroku/heroku-buildpack-php.git", + "reference": "5f56ed1ea916bbeec16bf85bec0c99583e33331a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/5f56ed1ea916bbeec16bf85bec0c99583e33331a", + "reference": "5f56ed1ea916bbeec16bf85bec0c99583e33331a", + "shasum": "" + }, + "bin": [ + "bin/heroku-hhvm-apache2", + "bin/heroku-hhvm-nginx", + "bin/heroku-php-apache2", + "bin/heroku-php-nginx" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Zuelke", + "email": "dz@heroku.com" + } + ], + "description": "Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP/HHVM and Apache2/Nginx as on Heroku", + "homepage": "http://github.com/heroku/heroku-buildpack-php", + "keywords": [ + "apache", + "apache2", + "foreman", + "heroku", + "hhvm", + "nginx", + "php" + ], + "time": "2015-12-18 14:29:45" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0b6a8940385311a24e060ec1fe35680e17c74497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0b6a8940385311a24e060ec1fe35680e17c74497", + "reference": "0b6a8940385311a24e060ec1fe35680e17c74497", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2015-11-04 20:28:58" + }, { "name": "symfony/var-dumper", - "version": "v2.7.7", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "72bcb27411780eaee9469729aace73c0d46fb2b8" + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/72bcb27411780eaee9469729aace73c0d46fb2b8", - "reference": "72bcb27411780eaee9469729aace73c0d46fb2b8", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/737e07704cca83f9dd0af926d45ce27eedc25657", + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" }, "suggest": { "ext-symfony_debug": "" @@ -232,7 +336,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -266,7 +370,7 @@ "debug", "dump" ], - "time": "2015-11-18 13:41:01" + "time": "2015-11-18 13:48:51" } ], "aliases": [], @@ -278,7 +382,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.0", + "php": "^5.4.0 || ^5.5.0 || ^5.6.0", "ext-pdo": "*" }, "platform-dev": [] diff --git a/config/herokuConfig.php b/config/herokuConfig.php new file mode 100644 index 000000000..2527e26a0 --- /dev/null +++ b/config/herokuConfig.php @@ -0,0 +1,33 @@ +DOIT) was created by the Center for Distributed Learning at the University of Central Florida. UDOIT will scan your course content, generate a report and provide instructions on how to correct accessibility issues. Funding for UDOIT was provided by a Canvas Grant awarded in 2014.'; -$error_msg_wrong_referrer = 'It looks like you tried to access UDOIT from a website other than Canvas. Please contact support.'; -$error_msg_no_referrer = 'Your web browser did not provide a referrer. Please contact support.'; - -/* Resource links */ -$resource_link = [ - 'doc' => 'http://webaim.org/techniques/word/', - 'pdf' => 'http://webaim.org/techniques/acrobat/', - 'ppt' => 'http://webaim.org/techniques/powerpoint/', -]; - -/* UDOIT test descriptions and examples */ -/* refer to /quail/guidelines/section508.php to view currently enabled tests */ -$udoit_tests = [ - 'severe' => [ - [ - 'name' => 'aMustContainText', - 'title' => 'Links should contain text', - 'desc' => '
Because many users of screen readers use links to navigate the page, providing links with no text (or with images that have empty "alt" attributes and no other readable text) hinders these users.
', - 'resources' => [ - 'Canvas Tutorial', - 'WCAG Guidelines', - 'WCAG Standard 2.4.4' - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('') .'
- Correct
-'. htmlspecialchars('read the document') .'
- ',
- ],
- [
- 'name' => 'imgHasAlt',
- 'title' => 'No Alternative Text found',
- 'desc' => 'Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', - 'resources' => [ - 'Resource on Alternative Text', - 'WCAG Standard: 1.1.1', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('-') .'
Correct
-'. htmlspecialchars('- ', - ], - [ - 'name' => 'imgAltIsDifferent', - 'title' => 'Alternative Text should not be the image filename', - 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', - 'resources' => [ - 'Resource on Alternative Text', - 'WCAG Standard: 1.1.1', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('-') .'
'. htmlspecialchars('-') .'
Correct
-'. htmlspecialchars('-') .'
'. htmlspecialchars('- ', - ], - [ - 'name' => 'imgAltIsTooLong', - 'title' => 'Alternative Text is more than 100 characters', - 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', - 'resources' => [ - 'Resource on Alternative Text', - 'WCAG Standard: 1.1.1' - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('-') .'
Correct
-'. htmlspecialchars('- ', - ], - [ - 'name' => 'imgAltNotEmptyInAnchor', - 'title' => 'Alt text for all img elements used as source anchors should not be empty', - 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', - 'resources' => [ - 'Resource on Alternative Text', - 'WCAG Standard: 1.1.1' - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('-') .'
Correct
-'. htmlspecialchars('- ', - ], - [ - 'name' => 'tableDataShouldHaveTh', - 'title' => 'No table headers found', - 'desc' => '') .'
Add a table header because it provides a description of the table structure for sighted and screen reader users.
', - 'resources' => [ - 'Resource Link', - 'WCAG Standard: 1.3.1', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('
Header One | Header Two |
1.30 | 4.50 |
Correct
-'. htmlspecialchars('
Header One | Header Two |
---|---|
1.30 | 4.50 |
Scope declarations in headers organize and define table data by row/column for sighted and screen reader users.
', - 'resources' => [ - 'Resource Link', - 'WCAG Standard: 1.3.1', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Heading 2 '."\n\t".' '."\n\t".''."\n\t\t".'Cell 1 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
- Correct
-'. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Heading 2 '."\n\t".' '."\n\t".''."\n\t\t".'Cell 1 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
- '. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Cell 1 '."\n\t".' '."\n\t".''."\n\t\t".'Heading 2 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
- ',
- ],
- [
- 'name' => 'cssTextHasContrast',
- 'title' => 'Insufficient text color contrast with the background',
- 'desc' => 'Text color should be easily viewable and should not be the only indicator of meaning or function. Color balance should have at least a 4.5:1 ratio.
', - 'resources' => [ - 'Resource Link', - 'WCAG Standard 1.4.3', - ], - 'example' => ' -Incorrect
-Bad contrasting text
Correct
-Good contrasting text
Multimedia objects should be accompanied by a link to a transcript of the content.
', - 'resources' => [ - 'WCAG Standard: 1.2.1', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('') .'
- Correct
-'. htmlspecialchars('') .'
- ',
- ],
- ],
- 'suggestion' => [
- [
- 'name' => 'imgGifNoFlicker',
- 'title' => 'Avoid the use of animated GIF’s',
- 'desc' => 'Animated GIFs may cause seizures if they flash more than 3 times per second. A recommendation is to use an alternative format to deliver the content.
', - 'resources' => [ - 'Resource Link', - 'WCAG Standard: 2.3.1', - ], - 'example' => '', - ], - [ - 'name' => 'videosEmbeddedOrLinkedNeedCaptions', - 'title' => 'Synchronized captions should be provided for prerecorded web-based video', - 'desc' => 'Captions should be included in the video to provide dialogue to users who are hearing impaired.
', - 'resources' => [ - 'Adding Captions to Youtube', - 'Creating Captions for Video Uploaded to Canvas', - 'CDL Video hosted video: CDL Video will caption video if a transcript is provided', - 'WCAG Standard 1.2.2', - ], - 'example' => '', - ], - [ - 'name' => 'aSuspiciousLinkText', - 'title' => 'Link text should be descriptive', - 'desc' => 'Links should be descriptive of the content they\'re linking to, such as "Class Schedule" rather than "schedule.html" or "click here".', - 'resources' => [ - 'Canvas Tutorial', - 'WCAG Guidelines', - 'WCAG Standard 2.4.4' - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('click here!') .'
- Correct
-'. htmlspecialchars('read the document') .'
- ',
- ],
- [
- 'name' => 'objectTextUpdatesWhenObjectChanges',
- 'title' => 'The text equivalents (e.g., transcripts and/or captions) for embedded content should update when content changes.',
- 'desc' => '',
- 'resources' => ['WCAG Standard: 1.2',],
- 'example' => '',
- ],
- // [
- // 'name' => 'objectLinkToMultimediaHasTextTranscript',
- // 'title' => 'Multimedia objects should have text equivalents (e.g., transcripts).',
- // 'desc' => 'Multimedia objects should be accompanied by a link to a transcript of the content.
', - // 'resources' => [ - // 'WCAG Standard: 1.2.1', - // ], - // 'example' => ' - //Incorrect
- //'. htmlspecialchars('') .'
- // Correct
- //'. htmlspecialchars('Read Transcript of the video') .'
- // ',
- // ],
- // [
- // 'name' => 'aLinksToMultiMediaRequireTranscript',
- // 'title' => 'Multimedia objects should have text equivalents (e.g., transcripts).',
- // 'desc' => 'Multimedia objects should be accompanied by a link to a transcript of the content.
', - // 'resources' => [ - // 'WCAG Standard: 1.2.1', - // ], - // 'example' => ' - //Incorrect
- //'. htmlspecialchars('Watch the interview') .'
- // Correct
- //'. htmlspecialchars('Watch the interview (transcript)') .'
- // ',
- // ],
- [
- 'name' => 'headersHaveText',
- 'title' => 'Headings should contain text',
- 'desc' => 'Sighted and screen reader users depend on headings to organize the content on the page. Headings should not be empty and should represent an accurate outline of the content
', - 'resources' => [ - 'Using H1-H6 to Identify Headings Article', - ], - 'example' => ' -Incorrect
-'. htmlspecialchars('') .'
- Correct
-'. htmlspecialchars('Title
') .'
- ',
- ],
- [
- 'name' => 'noHeadings',
- 'title' => 'Consider adding headings to your document to create more structure',
- 'desc' => 'If appropriate, add headings to the page to organize the content for sighted and screen reader users. The headings should represent an accurate outline of the content
', - 'resources' => [ - 'Resource Link', - 'WCAG standard 1.3.1 and 1.3.2', - ], - 'example' => '', - ], - [ - 'name' => 'pNotUsedAsHeader', - 'title' => 'Avoid using styles for document structure', - 'desc' => 'Bold and Italics are used to emphasize text, whereas headings are used to define the structure of the document. Headings like h1-h6
are extremely useful for non-sighted users to navigate the structure of the page, and formatting a paragraph to just be big or bold, while it might visually look like a heading, does not make it one.
Incorrect
-'. htmlspecialchars('Header 1
') .'
- Correct
-'. htmlspecialchars('Header 1
') .'
- ',
- ],
- ],
-];
diff --git a/config/settings.php b/config/settings.php
new file mode 100644
index 000000000..cb85eff9d
--- /dev/null
+++ b/config/settings.php
@@ -0,0 +1,31 @@
+DOIT) was created by the Center for Distributed Learning at the University of Central Florida. UDOIT will scan your course content, generate a report and provide instructions on how to correct accessibility issues. Funding for UDOIT was provided by a Canvas Grant awarded in 2014.';
+
+/* Resource links */
+$resource_link = [
+ 'doc' => 'http://webaim.org/techniques/word/',
+ 'pdf' => 'http://webaim.org/techniques/acrobat/',
+ 'ppt' => 'http://webaim.org/techniques/powerpoint/',
+];
diff --git a/config/tests.php b/config/tests.php
new file mode 100644
index 000000000..5fd4a321b
--- /dev/null
+++ b/config/tests.php
@@ -0,0 +1,229 @@
+ [
+ [
+ 'name' => 'aMustContainText',
+ 'title' => 'Links should contain text',
+ 'desc' => 'Because many users of screen readers use links to navigate the page, providing links with no text (or with images that have empty "alt" attributes and no other readable text) hinders these users.
', + 'resources' => [ + 'Canvas Tutorial', + 'WCAG Guidelines', + 'WCAG Standard 2.4.4' + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('') .'
+ Correct
+'. htmlspecialchars('read the document') .'
+ ',
+ ],
+ [
+ 'name' => 'imgHasAlt',
+ 'title' => 'No Alternative Text found',
+ 'desc' => 'Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', + 'resources' => [ + 'Resource on Alternative Text', + 'WCAG Standard: 1.1.1', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('+') .'
Correct
+'. htmlspecialchars('+ ', + ], + [ + 'name' => 'imgAltIsDifferent', + 'title' => 'Alternative Text should not be the image filename', + 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', + 'resources' => [ + 'Resource on Alternative Text', + 'WCAG Standard: 1.1.1', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('+') .'
'. htmlspecialchars('+') .'
Correct
+'. htmlspecialchars('+') .'
'. htmlspecialchars('+ ', + ], + [ + 'name' => 'imgAltIsTooLong', + 'title' => 'Alternative Text is more than 100 characters', + 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', + 'resources' => [ + 'Resource on Alternative Text', + 'WCAG Standard: 1.1.1' + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('+') .'
Correct
+'. htmlspecialchars('+ ', + ], + [ + 'name' => 'imgAltNotEmptyInAnchor', + 'title' => 'Alt text for all img elements used as source anchors should not be empty', + 'desc' => '') .'
Alternative Text (Alt Text) is an alternative (non-visual) way to describe the meaning of an image. Please provide a brief (under 100 characters) description of the image for a screen reader user. Note: It should not be the image file name.
', + 'resources' => [ + 'Resource on Alternative Text', + 'WCAG Standard: 1.1.1' + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('+') .'
Correct
+'. htmlspecialchars('+ ', + ], + [ + 'name' => 'tableDataShouldHaveTh', + 'title' => 'No table headers found', + 'desc' => '') .'
Add a table header because it provides a description of the table structure for sighted and screen reader users.
', + 'resources' => [ + 'Resource Link', + 'WCAG Standard: 1.3.1', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('
Header One | Header Two |
1.30 | 4.50 |
Correct
+'. htmlspecialchars('
Header One | Header Two |
---|---|
1.30 | 4.50 |
Scope declarations in headers organize and define table data by row/column for sighted and screen reader users.
', + 'resources' => [ + 'Resource Link', + 'WCAG Standard: 1.3.1', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Heading 2 '."\n\t".' '."\n\t".''."\n\t\t".'Cell 1 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
+ Correct
+'. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Heading 2 '."\n\t".' '."\n\t".''."\n\t\t".'Cell 1 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
+ '. htmlspecialchars(''."\n\t".''."\n\t\t".'Heading 1 '."\n\t\t".'Cell 1 '."\n\t".' '."\n\t".''."\n\t\t".'Heading 2 '."\n\t\t".'Cell 2 '."\n\t".' '."\n".'
') .'
+ ',
+ ],
+ [
+ 'name' => 'cssTextHasContrast',
+ 'title' => 'Insufficient text color contrast with the background',
+ 'desc' => 'Text color should be easily viewable and should not be the only indicator of meaning or function. Color balance should have at least a 4.5:1 ratio.
', + 'resources' => [ + 'Resource Link', + 'WCAG Standard 1.4.3', + ], + 'example' => ' +Incorrect
+Bad contrasting text
Correct
+Good contrasting text
Multimedia objects should be accompanied by a link to a transcript of the content.
', + 'resources' => [ + 'WCAG Standard: 1.2.1', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('') .'
+ Correct
+'. htmlspecialchars('') .'
+ ',
+ ],
+ ],
+ 'suggestion' => [
+ [
+ 'name' => 'imgGifNoFlicker',
+ 'title' => 'Avoid the use of animated GIF’s',
+ 'desc' => 'Animated GIFs may cause seizures if they flash more than 3 times per second. A recommendation is to use an alternative format to deliver the content.
', + 'resources' => [ + 'Resource Link', + 'WCAG Standard: 2.3.1', + ], + 'example' => '', + ], + [ + 'name' => 'videosEmbeddedOrLinkedNeedCaptions', + 'title' => 'Synchronized captions should be provided for prerecorded web-based video', + 'desc' => 'Captions should be included in the video to provide dialogue to users who are hearing impaired.
', + 'resources' => [ + 'Adding Captions to Youtube', + 'Creating Captions for Video Uploaded to Canvas', + 'CDL Video hosted video: CDL Video will caption video if a transcript is provided', + 'WCAG Standard 1.2.2', + ], + 'example' => '', + ], + [ + 'name' => 'aSuspiciousLinkText', + 'title' => 'Link text should be descriptive', + 'desc' => 'Links should be descriptive of the content they\'re linking to, such as "Class Schedule" rather than "schedule.html" or "click here".', + 'resources' => [ + 'Canvas Tutorial', + 'WCAG Guidelines', + 'WCAG Standard 2.4.4' + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('click here!') .'
+ Correct
+'. htmlspecialchars('read the document') .'
+ ',
+ ],
+ [
+ 'name' => 'objectTextUpdatesWhenObjectChanges',
+ 'title' => 'The text equivalents (e.g., transcripts and/or captions) for embedded content should update when content changes.',
+ 'desc' => '',
+ 'resources' => ['WCAG Standard: 1.2',],
+ 'example' => '',
+ ],
+ [
+ 'name' => 'headersHaveText',
+ 'title' => 'Headings should contain text',
+ 'desc' => 'Sighted and screen reader users depend on headings to organize the content on the page. Headings should not be empty and should represent an accurate outline of the content
', + 'resources' => [ + 'Using H1-H6 to Identify Headings Article', + ], + 'example' => ' +Incorrect
+'. htmlspecialchars('') .'
+ Correct
+'. htmlspecialchars('Title
') .'
+ ',
+ ],
+ [
+ 'name' => 'noHeadings',
+ 'title' => 'Consider adding headings to your document to create more structure',
+ 'desc' => 'If appropriate, add headings to the page to organize the content for sighted and screen reader users. The headings should represent an accurate outline of the content
', + 'resources' => [ + 'Resource Link', + 'WCAG standard 1.3.1 and 1.3.2', + ], + 'example' => '', + ], + [ + 'name' => 'pNotUsedAsHeader', + 'title' => 'Avoid using styles for document structure', + 'desc' => 'Bold and Italics are used to emphasize text, whereas headings are used to define the structure of the document. Headings like h1-h6
are extremely useful for non-sighted users to navigate the structure of the page, and formatting a paragraph to just be big or bold, while it might visually look like a heading, does not make it one.
Incorrect
+'. htmlspecialchars('Header 1
') .'
+ Correct
+'. htmlspecialchars('Header 1
') .'
+ ',
+ ],
+ ],
+];
diff --git a/db_mysql_setup.php b/db_mysql_setup.php
new file mode 100644
index 000000000..e9608c6a3
--- /dev/null
+++ b/db_mysql_setup.php
@@ -0,0 +1,29 @@
+query($reports_sql);
+$sth->execute();
+
+$sth = $dbh->query($users_sql);
+$sth->execute();
+
diff --git a/db_pg_setup.php b/db_pg_setup.php
new file mode 100644
index 000000000..76c8cf227
--- /dev/null
+++ b/db_pg_setup.php
@@ -0,0 +1,25 @@
+query($reports_sql);
+$sth->execute();
+
+$sth = $dbh->query($users_sql);
+$sth->execute();
diff --git a/img/udoit_logo.png b/img/udoit_logo.png
deleted file mode 100644
index 97197ed77..000000000
Binary files a/img/udoit_logo.png and /dev/null differ
diff --git a/lib/Udoit.php b/lib/Udoit.php
index d542bdff2..3cc96386b 100755
--- a/lib/Udoit.php
+++ b/lib/Udoit.php
@@ -17,8 +17,8 @@
*
* Primary Author Contact: Jacob Bates = $report['date_run']; ?> | -= $report['errors']; ?> | -= $report['suggestions']; ?> | +
=$report['date_run']?> | +=$report['errors']?> | +=$report['suggestions']?> |