Problem/Motivation
The CKEditor Accessibility Checker, formerly a proprietary plugin, has been released under the GPL.
Proposed resolution
This is a great time to look at bringing this accessibility checker in. Ideally it would be enabled by default in the Standard installation profile. This should help make content editors make their content better.
Remaining tasks
Blocking upstream CKEditor 5 issue: Implement accessibility checker for CKEditor 5 #1941
add Quail.js library to core (MIT license, maintainer is jessebeach).add balloonpanel plugin to Drupal's custom CKEditor build.add a11ychecker plugin to Drupal's custom CKEditor build.- add a11ychecker configuration options to
Drupal\ckeditor\Plugin\CKEditorPlugin\Internal
. - Write tests
User interface changes
Makes a new CKEditor plugin available - see demo video
Adds options relating to this plugin, for the text format configuration form.
API changes
None expected.
Data model changes
None expected.
Comment | File | Size | Author |
---|---|---|---|
#46 | interdiff-2731373-43-46.txt | 399 bytes | voleger |
#46 | 2731373-46.patch | 1.02 MB | voleger |
Issue fork drupal-2731373
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mgiffordComment #3
vokielComment #4
larowlanGreat idea!
Comment #5
wim leers+1 for the principle.
Renaming for consistency with #2239419: Include CKEditor's AutoGrow plug-in.
Comment #6
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedUpdating issue summary with the tasks we need to carry out. Adding the library assets are atomic enough that they can be separate task issues.
Comment #7
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedThe README included with a11ychecker says:
This is something we might want to document for developers.
Comment #8
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedAlso, it seems we could use a different a11y testing library instead of Quail. From the a11ychecker plugin page:
To make this work by default in core, we'll certainly need to include at least one a11y test library; it may as well be Quail.
In a follow-up issue, we could investigate adding an API (by plugin or hook) to allow contrib modules to provide other testing libraries or services. Possible candidates include aXe (open source library, Mozilla Public License) and Tenon.io (commercial API service).
Comment #9
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedComment #10
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedComment #11
wim leersI think Quail makes most sense, because:
Comment #12
cosmicdreams CreditAttribution: cosmicdreams commentedAnd as soon as we can use Fetch API I'm sure the code can evolve to use that instead of XMLHTTPRequest
Comment #13
wim leersThat's very, very far out.
Comment #14
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedRe: #12 That will be an upstream issue for Quail one day, but not a blocker for us here.
Comment #15
BarisW CreditAttribution: BarisW at LimoenGroen commentedWorking on this
Comment #16
BarisW CreditAttribution: BarisW at LimoenGroen commentedSo, here is a first stab at this. I recompiled ckeditor with the new plugins. Since this includes a diff on a minified 700kb jquery.js file and a new sprite image, the patch is huge.
- This patch still needs tests. I'll add those later.
- I don't think we need to add Quail, since the plugin comes with a quail library included.
- I still need to add a configuration form. Let's discuss first what we want to configure.
I've also include a patch without the ckeditor change, for easier review.
Comment #17
larowlanOne class? That's it?
Awesome!
Vote 1 for making this enabled by default in standard profile's editors
Comment #18
kattekrab CreditAttribution: kattekrab at Catalyst IT commentedwow. This is very cool.
Comment #19
wim leersGlad to see the many votes of support, but…
Increasing the size of CKEditor for *everyone* by 700 KB is not acceptable IMO. We should then load it as a CKEditor plugin, separately, and hence not increase the size of our CKEditor build.
Comment #20
BarisW CreditAttribution: BarisW at LimoenGroen commentedHi Wim,
apologies for not being clear. I meant that the ckeditor.js (not jquery.js) needs a small change to include the plugin. Drupal's original minified ckeditor.js is currently 544kb. With the new plugin added, it is 727kb (so an increase of 183kb).
Comment #21
BarisW CreditAttribution: BarisW at LimoenGroen commentedRemoved duplicate comment
Comment #22
FredCK CreditAttribution: FredCK commentedRelated issue: https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/202
I agree that the best approach would be including it as a plugin.
Comment #23
wim leersThat's still a too significant increase in size.
Glad to hear you confirm it :)
Comment #24
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedI imagined that Quail would be a separate library in
core/assets/vendor/quail
. Apart from addressing the performance concern, a separate Quail library would be good for other use-cases:editor.module
, and Quail could be used with those too. Quail already includes example plugins for Tiny MCE and Aloha editors.I wrote the tasks for the issue summary, without really understanding how the CKEditor build system worked. Sorry if that caused confusion.
Comment #25
BarisW CreditAttribution: BarisW at LimoenGroen commented@Wim; would you be so kind to explain what needs to be done te facilitate this? Either by updating the issue description or by sending me an e-mail. Thanks!
Comment #26
cosmicdreams CreditAttribution: cosmicdreams commentedIt sounds like the size of the library can (technically) be reduced. https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/202#issue...
Here's to hoping that version 1.0.1 is the first version that can suit all the use cases we've described above.
Comment #27
wim leers#24++
So:
core/assets/vendor/quail
, and list it incore.libraries.yml
. However, thea11ychecker
plugin does not yet support loading Quail from a separate location. There is https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/202 to solve that.a11ychecker
plugin tocore/assets/vendor/ckeditor-a11ychecker
. (Just like we havecore/assets/vendor/jquery
andcore/assets/vendor/jquery-form
etc.)sh build.sh
, which will minify all plugins, and we could then extract the one we want. Or, the much easier option: just download and extract http://ckeditor.com/addon/a11ychecker's tarball, and put it in that location.That means this issue is hard-blocked on https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/202.
(Sorry for the slow reply, I was blocked on a reply with advice from the CKEditor team.)
Comment #28
wim leersSo, clearly this is now blocked on upstream, on https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/202.
Comment #29
darol100 CreditAttribution: darol100 as a volunteer and commentedJust in case someone will want to have these features right away. There are contrib module for CKEditor Ballon Panel and for CKEditor Accessibility Checker.
Comment #31
christopher james francis rodgers CreditAttribution: christopher james francis rodgers commentedSimilar to this issue having had its version changed
from 8.2.x-dev » 8.3.x-dev
would someone please be so kind as to review
the list of Drupal 8 core issues
sorted with:
- Open
- Version "8.x"
- Tag "aria"
https://www.drupal.org/project/issues/search/drupal?status[]=Open&versio...
Would 'you' please change the version on any 8.2 issue
that you feel can justifiably be changed to 8.3
so that any 8.3 developers who do not look at 8.2 issues
will be aware of them.
I myself am in no way qualified to do that,
or I surely would.
Thank you for your time, attention, and help.
PS: This is the issue search for
'Open', '8.x', & 'accessibility'
if you have a few extra, um, minutes (or should I say 'hours'?)
to address those issues similarly. Thank you.
https://www.drupal.org/project/issues/search/drupal?text=&assigned=&subm...
Comment #32
wim leers#31: I don't understand your comment. How is it related to this issue?
Also: all issues must be filed against 8.2.x if they can be committed to 8.2.x. Bug fixes must land in 8.2.x first (and are then cherry-picked to 8.3.x). Tasks/feature requests must be committed to 8.3.x.
Comment #34
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commented@BarisW - thanks for prompting the CKEditor upstream issue for progress.
https://github.com/cksource/ckeditor-plugin-a11ychecker/issues/204#issue...
Comment #35
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedJust noticed that QuailJS is no longer being developed - there's a deprecation notice on the QuailJS Github repo.
Comment #36
mgiffordLooks like QuailJS is officially depreciated https://github.com/quailjs/quail-core
Until there's a new maintainer or see CKEditor adopt a maintained accessibility tool I would not recommend not doing this.
Comment #37
alisonHi all! Would you advise against using the a11ychecker CKEditor plugin (and module?) altogether, or is the Quail issue just a blocker for it being included in Core?
Also, #7 says you cannot run a11ychecker on a local filesystem -- does that mean there would be disruptive breakage if I'm working in a local environment, or does it degrade gracefully and the warning is just an FYI that this particular functionality won't work -- or something else entirely?
Thank you! I love the idea here, and I hope it can work out!
Comment #38
mgiffordI think this could all be re-implemnented in https://github.com/dequelabs/axe-core but right now there is no code for that.
I wouldn't recommend using the a11ychecker CKEditor plugin since a big part of the code base is no longer being maintained. As a security person, always a good idea to avoid that situation in production.
As far as #7, I'm not sure myself. I'm not certain how XMLHttpRequest requests work in any detail. I think your browser just wouldn't let you access the local file system.
Comment #43
volegerAddressing #38: Here is the patch of POC version of axe-core ckeditor integration.
Credits for the @azuma , @t0r, @artemboiko for the work on the integration.
So here some additional info:
https://github.com/artemboyko43/ckeditor-axe - Repo of the ckeditor4 axe-core plugin itself
https://github.com/semkulich/ckeditor_axe - Repo of the Drupal integration module for the plugin
https://github.com/iVegas/ckeditor_axe_env - Repo for the dev environment
Steps to review basic functionality (based on the demo_umami profile installation):
- apply the patch;
- install the module;
- edit the Basic text format and add the axe button on the panel. save changes;
- make sure that aggregation of the css/js files disabled, then cache rebuild;
- go to the one of the articles edit page;
- set the same value of the ID attribute on the two different tags within the body field in the source view mode. save changes;
- open the edited article edit page again
- press on the axe button
- select one of the available levels of the validation or keep the default options, press ok;
- now the window with the existing violations would appear;
Known issues of the current integration module:
- currently, no behavior implement for the content without issues;
- no configuration for the default text format after module installation;
- css/js aggregation issues
Hope this patch would be useful for further improvements of the a11y tool for the ckeditor.
Comment #44
volegerAnd the patch is here)
Comment #46
volegerComment #47
duaelfrComment #49
mandclu CreditAttribution: mandclu at Northern Commerce commentedI'm definitely in favour of having this functionality available, especially based on the axe core, now that quail has been deprecated. I understand the motivation of wanting this in core, but wouldn't it make more sense to get this working as a contrib module first, and then try to get it into core once it's been tested/used/validated as a standalone module first? Many other initiatives have gone this route, including Workspaces.
It's way easier to get people using this as a contrib module first IMHO. I'd be happy to help get this set up as a standalone project based on voleger's work in the most recent patch.
Comment #50
joshmiller@mandclu This does exist in contrib form: https://www.drupal.org/project/ckeditor_a11ychecker
Comment #52
mgifford@joshmiller I don't know how we should deal with this, but ckeditor_a11ychecker depends on QuailJS which is no longer supported and thus is a security problem. We should not be recommending that anyone use this CKEditor plugin until this is addressed.
Much better to recommend using:
https://www.drupal.org/project/ckeditor_accessibility_auditor
As at least it uses a maintained module https://github.com/squizlabs/HTML_CodeSniffer that is used by a lot of folks through Pa11y.
Since there hasn't been much movement at bringing in axe into Core, perhaps it might be possible to look at the HTML_CodeSniffer (even though it isn't as cool as axe).
Comment #53
wrd CreditAttribution: wrd as a volunteer commentedOne thought -- I don't know if this is feasible, but for organizations with an accessibility mandate (e.g., government organizations), it would be great to have an option to prevent publication of a node if it doesn't pass an accessibility check.
Comment #54
CalamityJen@mgifford Is there anything we can do to get HTML_CodeSniffer into a stable state covered by the security policy?
I know my organization is definitely interested in including an accessibility checker on our sites, but not being covered by the security policy is a major issue.
axe is great, but if HTML_CodeSniffer is more likely to happen then I'd be all for that.
Comment #55
mandclu CreditAttribution: mandclu at Northern Commerce commentedNew release of CKEditor Accessibility Auditor (which uses HTML_Codesniffer) to make it ready for Drupal 9.
https://www.drupal.org/project/ckeditor_accessibility_auditor/releases/8...
Comment #56
mgifford@wrd - like your concept. I'd spin that off as a separate issue. Whether it's simply having a forced check & compliance, or triggering something if there are errors. Even having it be mandatory to do a check before publishing could be useful. That said, it's a bigger issue than this one I think.
@CalamityJen - Agreed. I had hoped that CKEditor would develop an axe version but it hasn't happened yet. The Squizlabs code is well maintained from the looks of it https://github.com/squizlabs/HTML_CodeSniffer but just noticed that the license isn't going to be compatible with Drupal's https://github.com/squizlabs/HTML_CodeSniffer/blob/master/licence.txt
Guess we're back to looking for a way to bring in Axe.
Comment #57
mgiffordThis is also being discussed as part of an European initiative to improve the accessibility of authoring tools. Essentially, ATAG 2.0 Part B.
The We4Authors Cluster project is looking at improving authoring tools for a number of popular CMS like Drupal. This is one of the ideas that they are building on here - https://accessibilitycluster.com/authoringTool/
TwoSome examples of how it could be implemented are here:How we want to have the results displayed is very different than how do we generate these results though.
Comment #58
mandclu CreditAttribution: mandclu at Northern Commerce commentedThere's now a stable release for CKEditor Accessibility Auditor:
https://www.drupal.org/project/ckeditor_accessibility_auditor/releases/8...
Comment #59
mpotter CreditAttribution: mpotter at Phase2 commentedI much prefer the UI of the ckeditor_a11ychecker module, regardless of the QuailJS issue. We only enable the accessibility button in ckeditor for trusted users.
The CKEditor Accessibility Auditor flags way too many minor issues and is too complex for many content editors to the point where they just don't use the tool.
Example Tests
Note: our site theme is also applied to the WYSIWYG so colors, fonts, etc are an exact match to what will be displayed on the site. This is important when doing color contrast testing (that might depend on font size).
TEST 1: Created a two text paragraphs and then inserted an H6 heading in the middle:
TEST 2: added an H2 element above the first paragraph.
So for content editors, ckeditor_a11ychecker was a *much* better experience.
I agree that I would love to see a proper AXE-based tool. But lets remember to focus on the content editor experience when adding something like this to core. Too often I see accessibility reporting taken too far with so many minor warnings that it ends up being ignored.
Also, testing accessibility within CKEditor when sites often have a different Admin theme from their main theme will be problematic for issues like color contrast (link colors, etc). We'll need to properly set expectations on what rules are being tested. An accessible body field content doesn't necessarily mean the node page itself will pass accessibility. In our case we just want to flag content-related issues such as wrong heading levels to the editor.
Comment #61
mgiffordThanks for this review & comparison @mpotter - ideally we'd just be highlighting issues that are meaningful within CKEditor, or we should be allowed to select the CSS for the default theme rather than the admin theme.
I'm not sure how to resolve this without finding a way to bring axe into CKEditor and then customize it a lot. Maybe @mandclu has some thoughts on how to simplify the output from https://squizlabs.github.io/HTML_CodeSniffer/
Comment #62
mgiffordAlso worth noting that https://www.drupal.org/project/editoria11y might be a working example to run with too. It leverages https://ryersondmp.github.io/sa11y/ which uses https://khan.github.io/tota11y/
This is a fixable problem for the WYSIWYG.
Comment #63
mgiffordtypo
Comment #64
pcate CreditAttribution: pcate commentedThe ANDI accessibility checker might be something to consider (https://github.com/SSAgov/ANDI). It's developed by the U.S. Social Security Administration and I've found it to be one of the best a11y checkers.
Comment #65
itmaybejj CreditAttribution: itmaybejj at Princeton University commentedEditoria11y maintainer here. I'd argue for a new, "light" checker with as few false positives as possible, that runs automatically as users type. I've found checkers that hide behind a button tend to get ignored, and all the existing checkers have too-cluttered interfaces for non-technical users. I am not knocking them -- I LOVE them as a technical user and rely on them all the time -- but they are overwhelming for content authors.
Also worth noting -- I don't think we should be afraid to fork/adapt old code. The new tests that get added to checkers are ever-more-in-the-weeds issues with ARIA and the like. Tests that work today for things like heading nesting order and table headers are not going to change.
Honestly our time might be best spent helping with this same issue for CKEditor 5 -- might as well fix this for everyone, not just Drupal, and then just include that new native checker. I was hoping to finish my WordPress port of Editoria11y this spring and then turn my attention to this...
Comment #66
mandclu CreditAttribution: mandclu at Northern Commerce commentedRe: the comment from @mpotter about heading warnings, I personally thinking it's entirely appropriate to throw a warning (not an error) about using an h6 in content without any indication that this heading level is semantically correct. But it probably isn't worth squabbling over these kinds of details.
It would be possible to further customize CKEditor Accessibility Auditor, but as @mgifford has indicated, it would involve either dramatically restructuring the output of HTML_CodeSniffer, or potentially even forking it.
I haven't had a chance to use Editoria11y yet (but plan to shortly), so my opinion so far is based on the project page. Based on what I can see, this seems like a much better approach. I've updated the project page for CKEditor Accessibility Auditor to indicate that Editoria11y is likely a more robust solution for most use cases.
I agree with @itmaybejj that at this point, we should probably be thinking about the introduction of CKEditor 5 and what that would mean for anything that might be introduced in this thread. It seems like Editoria11y shouldn't be impacted by what version of CKEditor is in use, so I can see it still having value, especially because it should scan all page content, not just what's in the WYSIWYG.
I like the idea of more generally helping CKEditor 5 to identify accessibility issues as content is being created, but Drupal could also layer on something that would do a broader scan of all page content.
Comment #68
edmund.dunn CreditAttribution: edmund.dunn at Aten Design Group commentedI forked the code from the repos shared by @voleger above. It worked but the pop-up was buggy. I updated to the latest libraries for axe-core and for ckeditor4. The plugin itself is here https://github.com/ejdunn2001/ckeditor-axe the module is here https://www.drupal.org/project/ckeditor_axe. It seems to be working but it isn't displaying the results. I definitely am going to need some help and/or advice on this one.
Comment #70
damienmckennaComment #71
alisonSo many interesting plugin options (yay / ugh haha) -- for real though, this comment is me bumping the "Needs issue summary update" tag:
I think, either:
(1) Update with the options currently being considered
Or
(2) If the list of "in the running" plugins is itself TBD, we could simply say that in the summary, and remove what's listed in the summary right now (or move to "original issue summary" section).
-------
I'd be happy to help, especially if people pick "option 2" -- right now I just feel like I'm too behind to have a handle on what plugins are under consideration.
Comment #72
shaal++ for #65
Editoria11y experience is great!
Focusing on content editors and provide them with friendly explanations.
Comment #75
quietone CreditAttribution: quietone at PreviousNext commentedCKEditor has been removed from core, CKEditor 4 is removed from Drupal Core in 10.0.0
Comment #76
mgiffordSorry @quietone - I really think this needs to be a Drupal Core issue. There are some references to CKEditor 4, but this is bigger than that I think. Any development is going to happen in CKEditor 5 anyways.
I think it is an upstream issue though, as it should be addressed in CKEditor here - https://github.com/ckeditor/ckeditor5/issues/1941
It may just be that the approach is to talk to @itmaybejj about including Editoria11y in core.
Also definitely interested in @edmund.dunn's axe plugin.
Comment #77
wim leers@mgifford Does an accessibility tester exist for CKEditor 5?
Comment #78
mgiffordNo. Not yet. Which is why I marked it as Postponed.
To me that made more sense than moving this to a CKEditor 4 issue where it will become irrelevant.
Comment #79
wim leersMakes sense!
Tagging accordingly, to make it clear there's nothing actionable here right now.
Comment #80
yesct CreditAttribution: yesct at Lullabot for State of Georgia commented[updated issue summary]
Comment #81
itmaybejj CreditAttribution: itmaybejj at Princeton University commented...happy to report that Editoria11y now
works out of the box as a Ckeditor5 accessibility checker, which might provide a solution for your upstream problem.