ryersondmp / sa11y-wp

The official WordPress plugin for Sa11y, the accessibility quality assurance assistant. To learn more about Sa11y, visit the project website: https://sa11y.netlify.app/
https://wordpress.org/plugins/sa11y/
GNU General Public License v2.0
8 stars 1 forks source link

Store and review the reported items #6

Open HUisHU-Christian opened 1 year ago

HUisHU-Christian commented 1 year ago

It would be helpful if the reported items of each page could be stored in the database. This is useful as most a11y issues require the content to be altered in some way. However, in my role as developer, I'm not allowed to change the content in any way. I need to list the necessary actions to be done by the editors. Currently I do this manually, but I would appreciate some tool that would do this for me.

Once these items are available in a list, it could be shown as separate columns in the page / post overview or on a separate page. It would be in particular helpful to be able to sort this list by issue in the end. And an export to CSV would also be nice.

The plugin for editoria11y has this, but the export does not seem to work here and the test accuracy is not on par with sa11y from what I can see right now.

I'd be happy to donate some of my development hours for this project, but I'm not sure whether this is already planned or whether there is a guideline to follow (especially in regards of coding standards)

HUisHU-Christian commented 1 year ago

I just had a brief look into how to implement this and how it is implemented in editoria11y. So far I can imagine to have at least one table, which stores a single issue related to a given page / post ID. In editoria11y there is also a table to store the pages that have been scanned, but I'm not sure if this is useful and what for.

HUisHU-Christian commented 1 year ago

In order to get this implemented I wonder whether there is any event that is fired once the analysis is complete. I want to hook this to store the results in the database (via an AJAX or REST API call). Any hints?

HUisHU-Christian commented 1 year ago

I created two pull requests (in sa11y and here) in order to be able to store the results on database (see #7). If this goes to the right direction, it would be nice if could be merged. If not, please advise.

adamchaboryk commented 1 year ago

Hi Christian,

Sorry for the slow reply — I had a long weekend. Thank you for looking into this and pitching the idea.

I currently don't have any plans to add this functionality, although I'm not opposed to the idea if I had some help! I've held off on doing complex WordPress-specific functionality, as it's a little harder for me to maintain as a sole-maintainer. I try to focus my efforts on making the main engine (Sa11y) as feature rich as possible, given it's platform agnostic design.

A dashboard view would be great though, as it's a common feature in other cloud based accessibility suites. But this also has it's complexities, as there's no simple way to crawl and scan multiple pages at once.

Before jumping into code, maybe it would be better to ideate on how this would look, or what a table would look like.

I'll review your recent PRs, but would prefer to work from a separate branch.

HUisHU-Christian commented 1 year ago

Hi Adam,

I don't mind if you reject the pull request and wait for a better solution. I'd be happy to help out in regards of WordPress. I'm quite fluent with it, so I know what can be done. This said, I'm currently in the situation, that I have to deliver a report for a bigger WordPress based website (and applying fixes that can be done in code). This should get finished as soon as possible, so I can actually not wait until a the perfect solution is there. However, I do my things in my fork for now. Based on that work, I probably get a good idea what works (and what not).

It surely will be quick and dirty, but not written in stone.

The only thing I really need is this hook in the sa11y.js, which I have commited in the other pull request. It doesn't need to be exactly like that (it's actually a poor hack trying to undo parts of the l18n). Any way to get notified with the scan results after the checks completed are fine for me. Maybe you can review this first.

I believe that something like that will come handy for other interfaces as well.

adamchaboryk commented 1 year ago

I'll gladly accept the help! Just give me some time to review your WP pull request.

Implementing the event hook in sa11y.js is quick and easy, so I'll try to include that in my next release. I did some refactoring so it doesn't undo parts of the i18n — I left a comment on your other PR. Please check it out whenever you get a chance

adamchaboryk commented 1 year ago

Hi @HUisHU-Christian,

I've had a look at your PR — it still needs a bit of work before I can include it in a release. It needs to be adapted for multisite (or at least for now simply modified to only work if it's not a multisite installation). Secondly, every time the page is refreshed/or Sa11y is toggled on/off it populates the table with additional entries instead of overwriting the existing entries associated with the page ID. Tables also need to be deleted upon uninstall.

I'll update the dev branch, as I attempted to make it multisite compatible. We should have a conversation on next steps or how these stored results can be made more helpful for end users!

HUisHU-Christian commented 1 year ago

Hi Adam, sorry for the struggle. I have neither updated the code I have on my system with my GitHub-Fork nor have I done a pull request to the latest code.

You're indeed correct about all these issues. In fact I have added several features and fixes to the system. However, as I was assigned on another project yesterday (and today is my free[lance] friday), I was not able to fully sync it yet. I'll put it on my todo list and come back here, when it's done (hopefully tomorrow). I'll have to do the additional open source work in my spare time (and probably from my private account) then...

adamchaboryk commented 1 year ago

Don't apologize — I appreciate the help!!