-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.1] language of parts [a11y] #30939
Conversation
Any help on that part @dgrammatiko will be greatly appreciated |
I'm working on it. Unfortunately the build tools are not in great shape... |
ah - ok. I did spend a few hours trying but that was more a trial by error than actually knowing what I was doing |
@brianteeman check brianteeman#116 I will have to redo the JS part of the build tools but that should be ok for this PR |
Thank @dgrammatiko reviewing it and will work on the pr in the morning. really appreciate the assistance |
@dgrammatiko almost but not quite. The following needs to happen
I really did try and work out how to do all of this and I learnt a lot but not enough to resolve this |
I tried PR with a complete installation of Joomla! and the choice of languages in TinyMCE is not yet present. |
@adj9 please check in the plugin that its enabled for the toolbar you are using |
@brianteeman |
@brianteeman I tried to test this on Saturday and I also couldn't. The tiny plugin is not being correctly moved on npm ci (although in the log you can see some action is taken) I thought it was still a WiP and that's why I didn't comment earlier but reading your reply I guess this should work. Maybe @dgrammatiko can provide some hint on what might be happening? |
@brianteeman thank you very much for this clear explanation!! I can see the node_modules folder (I could also on Saturday) ✅. Now I can also see the folder in "media/plg_editors_tinymce/js/plugins/tinymce-language-selector" which I was not able to see on Saturday (I was not looking deeper enought in the tree I guess) ✅ But the "Language" button does not appear in the plugin editor: What am I missing? After npm ci should I do anything else? Thank you very much!! |
It's working as intended here. Two drawbacks:
Concerning 1. It would be great to be able to choose the display between English ( I modified the es6.js but it is always retrieved from One question: what does displaying a span with the lang tag gives as benefit to a11y? Would a screenreader finding the |
@carcam Look above the tabs. There you will find the |
@carcam Did you click on the Use Advanced Preset? @infograf768
Re the usefulness of the plugin. The accent thing is just an example. It is a requirement of WCAG AA that the language can be programmatically determined. It is not for us to question the WCAG |
That’s doable. If someone comes up with the field in the backend I can patch the js |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30939. |
Please remove the rtc. There are several outstanding todo |
@brianteeman is the todos in the PR description still current? Or other things to be done? |
OK I think this brianteeman#119 is what you were after. But let me know and can tweak further. I'm not an expert at these build scripts so 🤷♂️ |
Thanks @wilsonge I will check it shortly. However at this time I think this will need to be retargeted for 4.1 |
Agreed |
Some tests with the new code: That is: #30939 (comment) Also no reply here to #30939 (comment) concerning the translation of the term
No mention either of a necessary update to the tinyMCE lang js updates in For French it would need adding to BugIf I have'nt done anything wrong: When admin is French Language and selecting a lang other than "Browser Default" in the pop-up, I get : line is:
The pop-up does not close although the span is added to the text, for example I also sometimes get the error below. When admin is in en-GB, and I forget to highlight a term, I get:
although, this time the language selected does appear in the editor's bar. |
This is on hold until after 4.0. No point working on something with a 4.1 target at this time |
Moved this to draft so it's clear |
Good decision. My tests just demonstrated that there are much more TODOs than stated in the description. |
this will be re-opened after 4.0 is released |
This PR is now closed and will be created using new core tinymce functionality |
This PR is a draft to implement and showcase the new language of parts feature in tinyMCE It has been made to 4.1 as its a new feature This PR requires joomla#35605 which at the time of this PR has not been merged into 4.1dev This is a replacement PR of joomla#30939 This wraps the desired text in span tags with a lang attribute for the specified language. Unspecified text is assumed to be written in the page's language. This helps the resulting text comply with WCAG 2.0 3.1.2 Language of Parts: "The human language of each passage or phrase in the content can be programmatically determined..." If you have customised your tinymce editor toolbar you will need to edit the toolbar again to include this button. The need for this is based on the EU funded research project for improving the process of creating accessible content by authors https://accessibilitycluster.com/about You can view a video that demonstrates the benefits of this feature https://www.youtube.com/watch?v=BY9_xhjtLV4 and read the [Technical Sepecification](https://www.dropbox.com/s/mbzh30rdt0c0gqa/Technical%20specification%20-%20Change%20language%20%28We4Authors%20Cluster%29.pdf) that the research project produced. This PR is only a draft The remaining task is to decide - which languages to list - if they should be translatable - should they be fr for fr-FR - or should the list of languages be user selectable in the tinymce plugin configuration In addition the research project recommended that there should be some form of visible indicator to the content author that a piece of text has been marked as being in a specific language. TinyMCE have not implemented this (yet) but I think we could do it with some css? cc @chmst
Replaced with #35607 |
* [4.1] Language of Parts [a11y] This PR is a draft to implement and showcase the new language of parts feature in tinyMCE It has been made to 4.1 as its a new feature This PR requires #35605 which at the time of this PR has not been merged into 4.1dev This is a replacement PR of #30939 This wraps the desired text in span tags with a lang attribute for the specified language. Unspecified text is assumed to be written in the page's language. This helps the resulting text comply with WCAG 2.0 3.1.2 Language of Parts: "The human language of each passage or phrase in the content can be programmatically determined..." If you have customised your tinymce editor toolbar you will need to edit the toolbar again to include this button. The need for this is based on the EU funded research project for improving the process of creating accessible content by authors https://accessibilitycluster.com/about You can view a video that demonstrates the benefits of this feature https://www.youtube.com/watch?v=BY9_xhjtLV4 and read the [Technical Sepecification](https://www.dropbox.com/s/mbzh30rdt0c0gqa/Technical%20specification%20-%20Change%20language%20%28We4Authors%20Cluster%29.pdf) that the research project produced. This PR is only a draft The remaining task is to decide - which languages to list - if they should be translatable - should they be fr for fr-FR - or should the list of languages be user selectable in the tinymce plugin configuration In addition the research project recommended that there should be some form of visible indicator to the content author that a piece of text has been marked as being in a specific language. TinyMCE have not implemented this (yet) but I think we could do it with some css? cc @chmst * css * xml * lint * array * language strings * Update plugins/editors/tinymce/tinymce.php Co-authored-by: Quy <[email protected]> Co-authored-by: Quy <[email protected]> Co-authored-by: Benjamin Trenkle <[email protected]>
This is a plugin for TinyMCE 5 that allows users to specify what language their text is written in. As TinyMCE does not currently provide a plugin for language of parts this is an implementation of https://github.com/edx/tinymce-language-selector/.
The plugin wraps the desired text in span tags with a lang attribute for the specified language. Unspecified text is assumed to be written in the page's language. This helps the resulting text comply with WCAG 2.0 3.1.2 Language of Parts: "The human language of each passage or phrase in the content can be programmatically determined..."
The only valid comments are on the implementation of the plugin. Comments about the plugin itself should be addressed upstream at https://github.com/edx/tinymce-language-selector/
[ The need for this is based on the EU funded research project for improving the process of creating accessible content by authors https://accessibilitycluster.com/about ]
If you have customised your tinymce editor toolbar you will need to edit the toolbar again to include this one
Testing
Dont forget to do a full
npm ci
Todo - Help Wanted
In the build scripts
Thank to @dgrammatiko for the work so far on those scripts