Moodle
  1. Moodle
  2. MDL-7396 META BUG: Accessibility Compliance in Moodle 1.8
  3. MDL-7437

BIG: Extend HTML editor so it can "tag" passages as text with language

    Details

    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE
    • Rank:
      34119

      Description

      Changes in language should be marked up appropriately, especially e.g. in language teaching. This will allow screenreaders to switch languages accordingly and speak with the correct pronunciation.

      The HTML editor should make it easy to mark certain languages for this purpose (and also for multilang texts).

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          There is a small problem with lang attribute: if somebody uses <span lang="cs">?esky</span> <span lang="en">in english</span> without multilang filter both would be visible, with it only one of them. This might confuse people that know nothing about our multilang implementation. If there is only one <span> or <lang> tag, it works as expected.

          Show
          Petr Škoda added a comment - There is a small problem with lang attribute: if somebody uses <span lang="cs">?esky</span> <span lang="en">in english</span> without multilang filter both would be visible, with it only one of them. This might confuse people that know nothing about our multilang implementation. If there is only one <span> or <lang> tag, it works as expected.
          Hide
          Martin Dougiamas added a comment -

          Yes, this is a tricky problem. <span lang="es">blah</span> is the best correct way to mark up text that is meant to be in a specific language, and such tags are not broken by the HTML editor. The proper solution for this bug is to mark up text that way.

          However, like Petr said, there will be confusion with our multilang implementation, which uses the same tag. (Note that the <lang lang="es"></lang> form is obsolete and should not be used at all, we support it only for backward compatibility). As above, I think this tag makes good sense to use for this purpose so that when those texts end up in non-filtered circumstances they still work.

          So we need something else to distinguish multilang text from other normal text that may contain multiple languages.

          Should we perhaps add a class to one of them?

          <span lang="en" class="multi">

          or

          <span lang="en" class="nonmulti"> ?

          Show
          Martin Dougiamas added a comment - Yes, this is a tricky problem. <span lang="es">blah</span> is the best correct way to mark up text that is meant to be in a specific language, and such tags are not broken by the HTML editor. The proper solution for this bug is to mark up text that way. However, like Petr said, there will be confusion with our multilang implementation, which uses the same tag. (Note that the <lang lang="es"></lang> form is obsolete and should not be used at all, we support it only for backward compatibility). As above, I think this tag makes good sense to use for this purpose so that when those texts end up in non-filtered circumstances they still work. So we need something else to distinguish multilang text from other normal text that may contain multiple languages. Should we perhaps add a class to one of them? <span lang="en" class="multi"> or <span lang="en" class="nonmulti"> ?
          Hide
          Martin Dougiamas added a comment -

          Thinking further, the menu could contain two lists of languages, the first as normal and the second as "language-dependent text" (multilang).

          Selecting from the first would just insert the normal span tags.

          Selecting from the second would insert the span with a "multilang" class in it.

          Then we'd need to:

          1) Modify the filter to only work when

          • there is more than one language section in the text
          • the multilang class is used.

          2) For backward compatibility, search/replace the database for any occurrences of the old multilang tags and fix them up.

          How does that sound?

          Show
          Martin Dougiamas added a comment - Thinking further, the menu could contain two lists of languages, the first as normal and the second as "language-dependent text" (multilang). Selecting from the first would just insert the normal span tags. Selecting from the second would insert the span with a "multilang" class in it. Then we'd need to: 1) Modify the filter to only work when there is more than one language section in the text the multilang class is used. 2) For backward compatibility, search/replace the database for any occurrences of the old multilang tags and fix them up. How does that sound?
          Hide
          Vy-Shane Sin Fat added a comment -

          I've just checked in a fix for the editor.

          The editor now has a language drop down that allows the user to tag (via spans) content as being in different languages. E.g:

          <span lang="fr">Bonjour!</span>

          The above will tag the "Bonjour!" as French. If we want to tag a selection for the multilang filter, the format is:

          <span lang="fr" class="multilang">Bonjour!</span>

          We still need to fix the old multilang tags.

          Show
          Vy-Shane Sin Fat added a comment - I've just checked in a fix for the editor. The editor now has a language drop down that allows the user to tag (via spans) content as being in different languages. E.g: <span lang="fr">Bonjour!</span> The above will tag the "Bonjour!" as French. If we want to tag a selection for the multilang filter, the format is: <span lang="fr" class="multilang">Bonjour!</span> We still need to fix the old multilang tags.
          Hide
          Martin Dougiamas added a comment -

          This issue is fixed, I'll file a new one about adding the multilang class to old multilang tags.

          Show
          Martin Dougiamas added a comment - This issue is fixed, I'll file a new one about adding the multilang class to old multilang tags.

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: