Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
43afb61
Setup initial architecture.
Jun 20, 2022
de7fb1b
Update meta installation.
Jun 21, 2022
21c5b96
Remove usage because it's not central to the process.
Jun 21, 2022
2ee0634
Update DB pages > sites
Jun 21, 2022
adba54d
Remove testing sites view.
Jun 21, 2022
501a3ef
Further scrub pages.
Jun 21, 2022
ceefc44
Continue to change pages into sites.
Jun 21, 2022
4e422b2
some meta needs to be an array by default.
Jun 21, 2022
29e43ce
Get basic meta value.
Jun 21, 2022
3200fe2
better formatting
Jun 21, 2022
09c3809
Finalize sites processing.
Jun 21, 2022
a922ef9
Sex up the code.
Jun 21, 2022
b88d214
Remove unused script.
Jun 22, 2022
36e2fa0
EQUALIFY IS FOR EVERYONE!
Jun 22, 2022
4bf1510
Setup scan process with queuing system.
Jun 22, 2022
d67dc64
update name of scan init
Jun 22, 2022
6b7c8c9
Out with the old scanner, in with the new!
Jun 23, 2022
24c5c4a
Make Javascript prettier.
Jun 23, 2022
a389e6f
Allow socket connections with config.
Jun 27, 2022
b1399bf
Properly reference PHP and move actions that rely on CLI to their own…
Jun 27, 2022
eb33d24
Pretty up code.
Jun 27, 2022
b300951
Correct spelling to resolve Issue #50
Jun 28, 2022
9ea6af5
Update folder names to resolve Issue #50
Jun 28, 2022
267028d
Update folder names to resolve Issue #50
Jun 28, 2022
1c585a0
Code cleaning
Jun 28, 2022
db137b4
Comment cleanup.
Jun 28, 2022
9f8ec8e
Update CLI
Jun 28, 2022
071e3bb
Spelling update.
Jun 28, 2022
895d0f7
Make scan run as one process and better log in terminal
Jun 29, 2022
9db6083
Update wave to new alerting schema.
Jun 29, 2022
55917c1
Update WAVE and cli process
Jun 29, 2022
2ef9577
Remove unused file.
Jun 29, 2022
982a29d
update description
Jun 29, 2022
0a1026d
First pass at new alert process.
Jun 29, 2022
31a3a39
Lots of updates that I should've committed seperately.
Jun 30, 2022
61c8640
Finalize alerts meta.
Jun 30, 2022
71d57a7
Begin refactoring tabs to labels.
Jul 4, 2022
5454e5f
Continue with labels and refactor DB functions to be more universal.
Jul 4, 2022
7e0959d
Continue to create alerts save function and refactor db.
Jul 4, 2022
42cacde
Finalize add_label functionality
Jul 5, 2022
5cbf1a0
Display a value
Jul 5, 2022
c7dbe32
Add condition to set active view on label.
Jul 5, 2022
3e498e1
Setup alerts.
Jul 5, 2022
23d9ab5
Finish alerts and refactor DB functions.
Jul 6, 2022
8cba56b
Update labels.
Jul 6, 2022
eaa3412
Set large number entries per page.
Jul 6, 2022
ba64042
Start DB Entry
Jul 6, 2022
05ec577
Add delete alert functions.
Jul 7, 2022
e4a0fe4
Frangiapani fallback
Jul 7, 2022
eba8eb4
Update toggles active class
Jul 7, 2022
b98a2df
Update alert count.
Jul 7, 2022
562a473
Unread becomes "active"
Jul 7, 2022
8687181
Add count to labels.
Jul 7, 2022
6f1db72
General Beautification
Jul 7, 2022
158ced7
Update scan to new db params.
Jul 7, 2022
2f3412a
Begin creating integration helpers.
Jul 7, 2022
fb5cf98
Refactor away "tab" architecture.
Jul 7, 2022
eafdc74
Create "add_alert" functionality.
Jul 11, 2022
443ccf5
Remove testing code.
Jul 11, 2022
0647d2a
Update LF and create helper functions
Jul 12, 2022
21579d3
Move process to helpers
Jul 12, 2022
8c129f5
Ungeekify source
Jul 12, 2022
45d2bc3
Update WAVE alerting function.
Jul 12, 2022
2afc913
Add activate/ignore functions.
Jul 12, 2022
49914e1
Update labels to new alert settings.
Jul 12, 2022
52e33ff
Set default view to active alerts.
Jul 13, 2022
4dfe8ee
Prepare alerts for queuing architecture.
Jul 14, 2022
60a3177
Rename functions to be more syntactically correct.
Jul 14, 2022
65c8858
Update alerts process.
Jul 15, 2022
8c29324
Update the processed alerts.
Jul 25, 2022
f2b568e
Fix cli comment.
Jul 25, 2022
a00b3be
Remove HTML decoding
Jul 25, 2022
cfbcf68
Setup processing
Jul 26, 2022
23a6fc8
Update spinner
Jul 26, 2022
3206483
Remove Add_site and setup sites table
Jul 26, 2022
d370c39
Minor updates
Jul 26, 2022
7e0046a
Cleanup code for final release.
Jul 26, 2022
302f313
Merge pull request #54 from bbertucc/mvp1.2-controller_scanning
Jul 26, 2022
cb8d7db
Merge pull request #55 from bbertucc/bounty-2
Jul 26, 2022
e36e4f8
Cleanup process
Jul 26, 2022
5d896cf
Delete testing data.
Jul 26, 2022
6201cea
Fix current page number bug.
Jul 29, 2022
5fda54c
Fix spelling.
Jul 29, 2022
e198e58
Add Scan view
Aug 1, 2022
41066ac
Streamline icon classes.
Aug 1, 2022
e81756a
Finalize Scan view.
Aug 1, 2022
1e6c607
Update scan
Aug 1, 2022
34e29e8
Continue testing scan.
Aug 1, 2022
7a4f838
Cleanup code
Aug 1, 2022
d9adf25
Finish schedule scan.
Aug 1, 2022
c13ee53
Setup DB scan log
Aug 1, 2022
392f96e
Hookup scan to DB
Aug 1, 2022
207e98c
Cleanup log message.
Aug 1, 2022
712c35a
Refactor scheduled scan.
Aug 2, 2022
2b90f76
Finalize scan view.
Aug 2, 2022
6012ad2
Cleanup label looks.
Aug 2, 2022
57eabec
View all log.
Aug 2, 2022
81428e5
Create LF fallback.
Aug 2, 2022
7213bcf
Fix integration settings view
Aug 4, 2022
7f2fc3a
Add required field.
Aug 4, 2022
447c52f
Clean up unused vars and remove socket global var
ebertucc Aug 4, 2022
ffa2fa4
Keep scan status in termnial to close #59
Aug 4, 2022
c9c46be
Minor text updates.
Aug 4, 2022
e795637
Update alert acount to close #58
Aug 4, 2022
24d08c2
fix terminal spacing
Aug 4, 2022
02a22ca
Update word styling
Aug 4, 2022
9ad5cc6
Update error message.
Aug 5, 2022
744e564
Update comment style.
Aug 5, 2022
a28a48e
Archive sites to close to #62 and #60
Aug 8, 2022
f7a6f9c
Fix get alert count bug.
Aug 8, 2022
7d49698
Revert to buggy toggler
Aug 8, 2022
0bbc75c
Restore buggy version.
Aug 8, 2022
ea70f34
Rewite Filtering System to close #64
Aug 9, 2022
6ca9aff
Update process to resolve #65
Aug 10, 2022
315d831
Update title
Aug 10, 2022
2af7a0d
revert
Aug 10, 2022
2717979
update gitignore
ebertucc Aug 10, 2022
6156a18
Add Guzzle 7 via Composer
ebertucc Aug 10, 2022
f5dfa7a
Use Guzzle instead of cURL in adders
ebertucc Aug 10, 2022
0cbdf69
Add page count.
Aug 10, 2022
d583ca4
Prettify numbers.
Aug 10, 2022
aeedaec
Merge branch 'mvp1.2-controller_scanning' into mvp1.2-guzzle_adders
ebertucc Aug 10, 2022
709dbf3
Merge pull request #67 from bbertucc/mvp1.2-guzzle_adders
Aug 10, 2022
7df3b9e
Do not verify ssl in adders
ebertucc Aug 10, 2022
1c40c21
Minor style fixes.
Aug 10, 2022
bf31725
Number format update.
Aug 10, 2022
ba73e46
Minor formatting update.
Aug 10, 2022
b55a99c
Forgot the space!
Aug 10, 2022
730deb5
WIP: integrations overhaul
ebertucc Aug 11, 2022
0b97ea4
formatting update
Aug 11, 2022
58d5b65
Revamp unique site function with db function
Aug 11, 2022
38ff365
Chunk alerts and update some logging stuff.
Aug 11, 2022
77de81d
Chunk equalified alerts
Aug 11, 2022
645a535
Merge pull request #71 from bbertucc/mvp-1.2-limited_query
Aug 11, 2022
c8c664c
Minor refactoring
ebertucc Aug 16, 2022
09cb32b
Merge branch 'mvp-1.2' into mvp1.2-parallel_scanning
ebertucc Aug 16, 2022
4d177c2
Merge pull request #72 from bbertucc/mvp1.2-parallel_scanning
Aug 17, 2022
b64e2e3
Update readme
Aug 17, 2022
0181381
💋
Aug 17, 2022
937d3e1
Complete issue #63
Aug 17, 2022
0ee6e3d
style updates
Aug 17, 2022
9c4b4f7
Remove testing tabs
Aug 17, 2022
19b6623
Finalize guidelines and tags to resolve #63
Aug 18, 2022
7526e65
Trim HTML entitles from labels.
Aug 18, 2022
aba6c0c
Simplify Descriptions
Aug 18, 2022
27c73d8
Limit pages - related to #73
Aug 22, 2022
4fb7e17
delete tests
Aug 22, 2022
2fa9276
Allows scans to be re-run even if they fail.
Aug 22, 2022
5df4f35
Minor style fixes.
Aug 22, 2022
94790b7
Spelling update.
Aug 22, 2022
0623c77
Create queued alerts table.
Aug 22, 2022
61d3f38
Faster equalification and new alertification
Aug 22, 2022
471b283
Update limit
Aug 22, 2022
83be5df
Use join to register new alerts.
Aug 23, 2022
99dc133
Better error reporting.
Aug 24, 2022
38b1de1
Better error reporting.
Aug 24, 2022
980894e
Update page limit.
Aug 24, 2022
6da56c5
Re-add page processing logging.
Aug 24, 2022
305c91c
Set concurrent requests config
Aug 24, 2022
7adbf74
Fix weird XML error and fallback for pages.
Aug 24, 2022
74f1069
Add integrations kill switch.
Aug 24, 2022
a8ed0e1
Make kill message more pronounced.
Aug 24, 2022
9e4e034
Add timeout.
Aug 24, 2022
a304683
Get WAVE working.
Aug 24, 2022
9504ddd
Require WAVE key
Aug 25, 2022
132194f
Downgrade page limit.
Aug 25, 2022
c83c64c
Remove tag and guideline filters.
Aug 25, 2022
4591a83
More logical site name styling.
Aug 25, 2022
6ab101c
Correct WebAim fact and other updates.
Sep 6, 2022
6d1dd1e
Update README.md
Sep 6, 2022
fdfa1a1
Grammar changes.
Sep 6, 2022
18a8e64
Grammar fixes.
Sep 7, 2022
0d5fd5b
Update README.md
Sep 7, 2022
49576d5
Update README.md
Sep 7, 2022
fc6a973
Update required socket.
Sep 14, 2022
4faa81f
Merge branch 'main' into mvp-1.2
Sep 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
.vscode
login/
config.php
config.php
vendor/
test/
55 changes: 23 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,54 @@
# Equalify the web!

**96.8% of homepages are inaccessible**, according to [WebAIM](https://webaim.org/projects/million/).
**96.8% of homepages have WCAG conformance failures,** according to [WebAIM](https://webaim.org/projects/million/).

That statistic is unacceptable.

Everyone should have access to online information.
The internet must become more accessible!

## Support Equalify

⭐ Star the repo to show your support.

⬇️ [Download and use](https://github.com/bbertucc/equalify#download-and-use) Equalify.
⭐ **Star the repo** to show your support.

🛠️ Contribute with a pull request or [new issue](https://github.com/bbertucc/equalify/issues).
🌸 **Try our managed service**, [equalify.app](https://equalify.app/).

## How will Equalify increase accessibility?
🛠️ **Contribute a pull request** or [new issue](https://github.com/bbertucc/equalify/issues).

Equalify creates deep integrations with services that run your website.
🎩 **[Donate](https://equalify.app/donate/)** to Equalify.

Imagine: You solve A11Y issues at their source - be that source the server or a CMS.
## How will Equalify increase content accessibility?

Equalify will become your WebOps hub, designed to solve any accessibility issue.
Equalify aims to:
1. **Promote transparency** with a Open Source A11Y platform (✅ Done!).
2. **Reduce the cost** of multi-page website scans (ongoing).
3. **Improve automation** to simplify WCAG issue resolution (2023).

<img width="1375" alt="A screenshot of Equalify's Integrations page." src="https://user-images.githubusercontent.com/46652/185225047-9c1c2e0f-4c4d-490b-a253-f3172710f1b0.png">
We will tackle these goals by integrating with existing web services, making Equalify your WebOps hub.

![equalify-integrations](https://user-images.githubusercontent.com/46652/188710874-e53ccb85-f542-46f3-a680-837aaf02ae92.png)

## What does Equalify currently do?

The app currently scans pages for WCAG errors.

Equalify supports [Little Forest](https://littleforest.co.uk/feature/web-accessibility/), a free WCAG 2.1 scan, and the popular [WAVE scan](https://wave.webaim.org/).
The app currently scans websites for WCAG errors.

After selecting an integration, import any site.
You can import pages from WordPress, XML sitemaps, and single URLs. Equalify then crawls all your pages for WCAG 2.1 errors using the popular [WAVE scan](https://wave.webaim.org/).

The app imports pages from XML sitemaps, the WordPress API, and single URLs.
Every alert is reported on a filterable dashboard.

After all your pages are added, click "Scan" and Equalify reports WCAG errors as they are found.

The goal: **Equalify every website.**

![equalify-screenshot-1](https://user-images.githubusercontent.com/46652/185225467-de1114fc-8f96-4b41-8365-897de3b55d5f.png)
![equalify-alerts](https://user-images.githubusercontent.com/46652/188710908-9bfb7da8-68ff-490c-8d6b-f9ce1f38d4c8.png)

## Download and Use
1. Download or clone [the latest release](https://github.com/bbertucc/equalify/releases).
2. Change `sample-config.php` to `config.php` and update info.
3. Upload/run on a Linux server (PHP 8 + MySQL required).
4. Report [issues](https://github.com/bbertucc/equalify/issues), questions, and patches.
5. Checkout our [demo video](https://www.youtube.com/watch?v=yrsG32G3I0g) for usage tips.
6. Report [issues](https://github.com/bbertucc/equalify/issues), questions, and patches.
3. Run `composer install` to install Composer dependencies.
4. Upload/run on a Linux server (PHP 8 + MySQL required).
5. Report [issues](https://github.com/bbertucc/equalify/issues), questions, and patches.

Not a technical user? Signup for our early access program at [equalify.app](https://equalify.app/).
**Not a technical user?** Use Equalify now at [equalify.app](https://equalify.app/).

## Special Thanks
A chaos wizard 🧙 and many brilliant brains help Equalify. Special shoutout to [Pantheon](https://pantheon.io/) and [Little Forest](https://littleforest.co.uk/feature/web-accessibility/) for providing funding for Drupalcon tickets and other great resources that help this project grow. Yi, Kate, Bill, Dash, Sylvia, Anne, Doug, Matt, Nathan, and John- You are the braintrust behind any great idea. Brad- You push me to code better. [@ebertucc](https://github.com/ebertucc) and [@jrchamp](https://github.com/jrchamp)- I consider y'all first contributors - woot woot! & Grace- You are the 🔥 behind everything I do.
A chaos wizard 🧙 and many brilliant brains help Equalify. Special shoutout to [Pantheon](https://pantheon.io/) and [Little Forest](https://littleforest.co.uk/feature/web-accessibility/) for providing funding for [bounties](https://github.com/bbertucc/equalify/issues?q=is%3Aopen+is%3Aissue+label%3Abountied). Yi, Kate, Bill, Dash, Sylvia, Anne, Doug, Matt, Nathan, and John- You are the brains behind any great idea. Brad- You push me to code better. [@ebertucc](https://github.com/ebertucc) and [@jrchamp](https://github.com/jrchamp) are the project's first contributors - woot woot! [Guzzle](https://github.com/guzzle/guzzle) makes multiple concurrent scans possible. [Composer](https://getcomposer.org/) makes Guzzle possible.

This project is Open Source to inspire new collaborations.
This project is Open Source under [AGPL](https://github.com/bbertucc/equalify/blob/mvp-1.2/LICENSE) to inspire new collaborations.

Together, **we can equalify the internet**.

-[@bbertucc](https://github.com/bbertucc)

PS: For more information on the notions behind Equalify, see my [Ethical Business Notion page](https://bbertucc.notion.site/Ethical-Business-7d8cb00d2e5f4558998450d6e38a61b6).
42 changes: 42 additions & 0 deletions actions/activate_alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**************!!EQUALIFY IS FOR EVERYONE!!***************
* This document activates an alert.
*
* As always, we must remember that every function should
* be designed to be as efficient as possible so that
* Equalify works for everyone.
**********************************************************/

// Info on DB must be declared to use db.php models.
require_once '../config.php';
require_once '../models/db.php';

// Let's get the ID that powers this action.
$id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
if(empty($id))
throw new Exception(
'ID "'.$id.'" is invalid or missing'
);

// We will redirect back to a specified to a preset.
$preset = '';
if (isset($_GET['preset']))
$preset = '&preset='.$_GET['preset'];

// Set the entry to "active".
$alert_arguments = array(
array(

// What else? You can add arrays if you
// want.
'name' => 'status',
'value'=> 'active'

)
);
DataAccess::update_db_entry(
'alerts', $id, $alert_arguments
);

// If a "referrer" session was create
header('Location: ../index.php?view=alerts'.$preset);
68 changes: 59 additions & 9 deletions actions/add_site.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,89 @@
<?php
// ***************!!EQUALIFY IS FOR EVERYONE!!***************

// Info on DB must be declared to use db.php models.
require_once '../config.php';
require_once '../models/adders.php';
require_once '../models/db.php';

// We don't validate the URLs here because cURL does
// a better job of validating/redirecting in the adders.
$site_url = $_GET['url'];
if($site_url == false)
// We don't validate the URLs here because cURL does a better
// job of validating/redirecting in the adders.
$url = $_POST['url'];
if($url == false)
throw new Exception('URL is missing');

// We need to check the type since a user could manually
// update the URL string to something unsupported.
$type = $_GET['type'];
$type = $_POST['type'];
if( $type == false)
throw new Exception('Type is not specified for the URL "'.$site_url.'"');
throw new Exception(
'Type is not specified for the URL "'.$url.'"'
);

// We also need to see if the site is of a unique URL.
$filters = array(
array(
'name' => 'url',
'value' => $url,
'condition' => 'OR'
),
array(
'name' => 'url',
'value' => $url.'/',
'condition' => 'OR'
),
array(
'name' => 'url',
'value' => 'https://'.$url.'/',
'condition' => 'OR'
),
array(
'name' => 'url',
'value' => 'http://'.$url.'/',
'condition' => 'OR'
)
);
$sites_with_url = DataAccess::get_db_rows('sites', $filters)['content'];
if( !empty($sites_with_url) )
throw new Exception('"'.$url.'" already exists');

// Static pages are treated as sites in themselves.
if($type == 'single_page' ){
single_page_adder($site_url);
$site = single_page_adder($url);

// WordPress sites are added via their API.
}elseif($type == 'wordpress'){
wordpress_site_adder($site_url);
$site = wordpress_site_adder($url);

// .XML sites use the latest version of XML standards.
}elseif($type == 'xml'){
xml_site_adder($site_url);
$site = xml_site_adder($url);

// Since we're passing type through a URL, we have a fallback
// in case someone passes an unsupported 'type'.
}else{
throw new Exception('"'.$type.'" sites are unsupported');
}

// If no errors occur, we can add these sites into the URL
// with several default items.
$fields = array(
array(
'name' => 'url',
'value' => $url
),
array(
'name' => 'type',
'value' => $type
),
array(
'name' => 'status',
'value' => 'active'
)
);
DataAccess::add_db_entry(
'sites', $fields
);

// Back home we go.
header('Location: ../index.php?view=sites&status=success');
19 changes: 0 additions & 19 deletions actions/delete_alert.php

This file was deleted.

24 changes: 0 additions & 24 deletions actions/delete_alert_tab.php

This file was deleted.

29 changes: 29 additions & 0 deletions actions/delete_label.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**************!!EQUALIFY IS FOR EVERYONE!!***************
* This document deletes labels.
*
* As always, we must remember that every function should
* be designed to be as efficient as possible so that
* Equalify works for everyone.
**********************************************************/

// Info on DB must be declared to use db.php models.
require_once '../config.php';
require_once '../models/db.php';

// Setup variables.
$alert_label = $_GET['name'];

// Delete DB
$filtered_to_label = array(
array(
'name' => 'meta_name',
'value' => $_GET['name'],
)
);
DataAccess::delete_db_entries(
'meta', $filtered_to_label
);

// Reload alerts page.
header('Location: ../index.php?view=alerts');
32 changes: 32 additions & 0 deletions actions/get_alert_count.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**************!!EQUALIFY IS FOR EVERYONE!!***************
* This script gets scan_log from the DB.
*
* As always, we must remember that every function should
* be designed to be as efficient as possible so that
* Equalify works for everyone.
**********************************************************/

// Since this file can run in the CLI, we must set the
// directory if it isn't already set.
if(!defined('__ROOT__'))
define('__ROOT__', dirname(dirname(__FILE__)));

// Info on DB must be declared to use db.php models.
require_once(__ROOT__.'/config.php');
require_once(__ROOT__.'/models/db.php');

// Return the scan log.
$filtered_to_active_status = array(
array(
'name' => 'status',
'value' => 'active'
),
array(
'name' => 'archived',
'value' => 0
)
);
echo number_format(DataAccess::count_db_rows(
'alerts', $filtered_to_active_status
));
8 changes: 0 additions & 8 deletions actions/get_alerts.php

This file was deleted.

20 changes: 20 additions & 0 deletions actions/get_scan_log.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**************!!EQUALIFY IS FOR EVERYONE!!***************
* This script gets scan_log from the DB.
*
* As always, we must remember that every function should
* be designed to be as efficient as possible so that
* Equalify works for everyone.
**********************************************************/

// Since this file can run in the CLI, we must set the
// directory if it isn't already set.
if(!defined('__ROOT__'))
define('__ROOT__', dirname(dirname(__FILE__)));

// Info on DB must be declared to use db.php models.
require_once(__ROOT__.'/config.php');
require_once(__ROOT__.'/models/db.php');

// Return the scan log.
echo DataAccess::get_meta_value('scan_log');
Loading