Skip to content

Update Jooa11y with latest Sa11y build#42768

Closed
adamchaboryk wants to merge 15 commits intojoomla:5.1-devfrom
adamchaboryk:5.0-dev
Closed

Update Jooa11y with latest Sa11y build#42768
adamchaboryk wants to merge 15 commits intojoomla:5.1-devfrom
adamchaboryk:5.0-dev

Conversation

@adamchaboryk
Copy link
Copy Markdown
Contributor

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?

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.0-dev labels Feb 6, 2024
@brianteeman
Copy link
Copy Markdown
Contributor

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.)

@adamchaboryk
Copy link
Copy Markdown
Contributor Author

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!

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Feb 7, 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.

@Fedik Fedik added the Feature label Feb 8, 2024
@Fedik
Copy link
Copy Markdown
Member

Fedik commented Feb 8, 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

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Feb 8, 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.

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Feb 8, 2024

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

@joomla-cms-bot joomla-cms-bot added Unit/System Tests and removed Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester labels Feb 9, 2024
@adamchaboryk adamchaboryk marked this pull request as draft February 9, 2024 00:46
@adamchaboryk
Copy link
Copy Markdown
Contributor Author

adamchaboryk commented Feb 9, 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.

@adamchaboryk adamchaboryk changed the base branch from 5.0-dev to 5.1-dev February 9, 2024 03:20
@adamchaboryk adamchaboryk deleted the 5.0-dev branch February 9, 2024 13:46
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.1-dev and removed Unit/System Tests labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants