Feature Unit/System Tests PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar adamchaboryk
adamchaboryk
6 Feb 2024

Summary of Changes

This PR adds Sa11y as a dependency, ensuring seamless and automatic updates for future Joomla releases.

  • Sa11y is added as a dependency via build/build-modules-js/settings.json.
  • Addition of several new languages.
    • New languages would be added by modifying build/build-modules-js/settings.json.
    • Automatic language detection based on page language.
    • Note: Only the admin settings will utilize Joomla's PLG language system.
  • New configuration/properties in admin settings to customize experience for content editors.

Related issue: joomla-projects/joomla-a11y-checker#75

Testing Instructions

  • Ensure you have a fresh JS build via npm install
  • Navigate to "Accessibility Check" as you would normally. Accessibility Checker should appear in same spot.

Actual result BEFORE applying this Pull Request

https://joomla-projects.github.io/joomla-a11y-checker/pages/errors.html

Expected result AFTER applying this Pull Request

Editor preview

Screenshot of Joomla Accessibility Checker using Accessibility Check preview on a German page.

Plugin settings

New Joomla Accessibility Checker plugin admin settings.

Link to documentations

Please select:

Is this page (https://manual.joomla.org/docs/accessibility/testing) something I can help update?

avatar adamchaboryk adamchaboryk - open - 6 Feb 2024
avatar adamchaboryk adamchaboryk - change - 6 Feb 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2024
Category Administration Language & Strings Repository NPM Change JavaScript Front End Plugins
avatar brianteeman
brianteeman - comment - 6 Feb 2024

Thanks for this work @adamchaboryk

To those that don't know Adam is the creator of sa11y. We originally made a hard fork for the reasons stated here joomla-projects/joomla-a11y-checker#75 but it is not really needed now.

The only major consideration for the Production Dept and maintainers is that the language strings are now provided by sa11y and not by Joomla. But thats no different to how the tinymce translations are done now. (this will probably necessitate an update/uninstall script.)

avatar adamchaboryk adamchaboryk - change - 6 Feb 2024
Labels Added: Language Change NPM Resource Changed PR-5.0-dev
avatar adamchaboryk
adamchaboryk - comment - 6 Feb 2024

Thanks for this work @adamchaboryk

To those that don't know Adam is the creator of sa11y. We originally made a hard fork for the reasons stated here joomla-projects/joomla-a11y-checker#75 but it is not really needed now.

The only major consideration for the Production Dept and maintainers is that the language strings are now provided by sa11y and not by Joomla. But thats no different to how the tinymce translations are done now. (this will probably necessitate an update/uninstall script.)

Thanks @brianteeman! I'm looking forward to future contributions — I'll ensure new translations make its way into Joomla!

avatar Fedik
Fedik - comment - 7 Feb 2024

Hi Adam, thanks for the PR .
I will give a couple notes, later ?

Is this page (https://manual.joomla.org/docs/accessibility/testing) something I can help update?

The manual lives here https://github.com/joomla/Manual
If you like, you can do PR to edit it.

avatar Fedik
Fedik - comment - 8 Feb 2024

In Joomla we do not mix PHP with JavaScript code, it is forbiden ?
It require a couple changes in the PR.

Since Joomla 5 we can use ESM importmap, basicaly it is a WebAsset with special property https://manual.joomla.org/docs/general-concepts/web-asset-manager#working-with-esm-importmap

avatar Fedik
Fedik - comment - 8 Feb 2024

I have wrote a couple notes, I hope I did not forget anything :)

Another thing looks strange is extraProps, I kind of understand why you made it.
In wich format user should enter this value?

If you want just a key/value, you can use a subform field instead of textarea:

<field type="subform" name="extraProps" multiple="true" label="foobar label">
 <form>
  <field type="text" name="key" label="Key"/>
  <field type="text" name="value" label="Value"/>
 </form>
</field>

If just a key/bool, then:

<field type="subform" name="extraProps" multiple="true" label="foobar label">
 <form>
  <field type="text" name="key" label="Key"/>
  <field type="radio" name="value" label="Value" default="1" layout="joomla.form.field.radio.switcher">
   <option value="0">JOFF</option>
   <option value="1">JON</option>
  </field>
 </form>
</field>

Then you do not need that complex function prepareExtraProps($extraProps) in plugin.

avatar Fedik
Fedik - comment - 8 Feb 2024

One more thing, please rebase it to 5.1-dev branch, because 5.0-dev only for bugfixes already.

avatar adamchaboryk adamchaboryk - change - 9 Feb 2024
Labels Added: Feature
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2024
Category Administration Language & Strings Repository NPM Change JavaScript Front End Plugins Unit Tests Repository Administration com_admin SQL Postgresql com_banners com_categories com_contact
avatar adamchaboryk
adamchaboryk - comment - 9 Feb 2024

Thank you for the detailed feedback, @Fedik! I attempted (my first) re-base, and I don't think it went very smoothly... My apologies — I did not mean to send out multiple review requests.

avatar adamchaboryk adamchaboryk - close - 9 Feb 2024
avatar adamchaboryk adamchaboryk - change - 9 Feb 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-02-09 13:46:57
Closed_By adamchaboryk
Labels Added: Unit/System Tests
Removed: Language Change NPM Resource Changed
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2024
Category Administration Repository Unit Tests com_admin SQL Postgresql com_banners com_categories com_contact Administration Language & Strings Repository NPM Change JavaScript Front End Plugins

Add a Comment

Login with GitHub to post a comment