Incorporate simple Plain Language checker for content

Created on 3 June 2021, over 3 years ago
Updated 1 December 2023, 10 months ago

Problem/Motivation

Similar to how we have built in support for spell checking into CKEditor, it would be useful to evaluate the reading level of the content that is produced. We need not do anything other than report that to the author at this stage, but alerting users to the complexity of their writing can help them write in a format that makes it easier for everyone to understand (and translate).

Proposed resolution

I don't expect something like https://github.com/wooorm/readability or similar https://hemingwayapp.com interfaces (but wow that would be a cool option).

There may be language issues as plain language isn't equally available https://github.com/accessibility/multilingual but the Flesch–Kincaid readability tests work well for several popular Drupal languages. It would be language dependent.

CKEditor 5 will support spelling & grammar checks - https://ckeditor.com/docs/ckeditor5/latest/features/spelling-and-grammar...

This D7 Contrib module was useful https://www.drupal.org/project/readability

This D8 Contrib module includes a score https://www.drupal.org/project/content_readability

Plain language is an important issue for government & education sectors:
- https://accessibility.civicactions.com/guide/plain-language

Related issue in CKEditor - https://github.com/ckeditor/ckeditor5/issues/9819

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0

Component
Text 

Last updated 7 days ago

Created by

🇨🇦Canada mgifford Ottawa, Ontario

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada mgifford Ottawa, Ontario

    Thanks @GreenSkunk I do think that this could be quite useful to show to authors. There are these PHP based tools like https://github.com/DaveChild/Text-Statistics which the Content Readability module uses but also worth noting that this could be delivered through JS too.

    https://github.com/yichiang/plain-language-checker
    https://github.com/duereg/too-wordy
    https://github.com/retextjs/retext-readability
    https://github.com/clearnote01/readability
    https://github.com/btford/passive-voice/tree/master

    One challenge for Drupal with this is that most of these are really focused on English specifically or at least European languages.

    @quietone I moved this back to Drupal core as it really should be something we look at for CKEditor 5. Really don't see any interest in developing anything new on CKEditor 4.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    One challenge for Drupal with this is that most of these are really focused on English specifically or at least European languages.

    This is where my mind went, immediately. 😅

    I'm not sure if this would ever make sense in Drupal core for that reason. I think this would make for a superb contributed module though, and once that is mature enough, we could consider moving it into Drupal core, once it also has facilities to allow additional modules to add support for more languages 😊

    Also, technically speaking, this does not need to be coupled to CKEditor 5 at all. Why not support it for all text fields? And provide a status report entry for it? That'd show you which content is in strongest need of simplification, and would allow updated rules to be checked across the entire site instead of just for the content you're editing.

    Since this is not yet in the ckeditor5.module component, moving it to the text.module component — let's see where this goes! 🤓

  • 🇦🇺Australia sime Melbourne

    Just thoughts on why I don't think this is practical in core. This would make an awesome module. I looked at this with hemingway and ckeditor 4 and i concluded there were few UI patterns that could be followed:

    1) Target the current input box with an a regularly updating value in (say) the settings tray.
    2) Show a summary on a preview page - whereby you could optionally force the user to show a preview.
    3) If someone was approving a new version they would see the readability score during that process before publishing.

    From a practical point of view of an "approver" role, you might want your readability assessment to target a rendered area which it might include mutiple entities, formats and text fields. There might be multiple rendered areas on the page/entity you want to differentiate from a readability POV. So then are you incorporating such a module at the display settings level off arbitrary entities - you've now drifted further away from wysiwyg and text areas.

  • 🇳🇿New Zealand quietone

    Reading the issue summary I think this is a discussion is to have with the product managers. I checked on committer slack if I was on the right track and larowlan agreed. Therefor, I am moving this to the Core ideas project.

  • It's an interesting idea for sites that have blog posts or something, but it wouldn't make sense for every site or every content type.

    I also think it makes more sense as a contrib module first to gauge interested level. The plan for Drupal 11 has the goal of creating a smaller Drupal Core via "The Great Module Migration", so we don't want to add a bunch of things to Core again in opposition to this goal if it won't be used by many sites.

Production build 0.71.5 2024