Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39079

Adding title attribute to links for accessibility goes against recommendations in WCAG and is rarely useful.

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_25_STABLE

      Description

      Needs confirming in Jaws.

      Found in testing MDL-35883.

      A link like this <a title="View user profile">Dan the man</a> appears to screen readers as:

      link Dan the man

      The extra information provided by the title is not read out.

      We should have a clear policy on this that meets the WCAG recommendations.
      We should then have a meta task to change uses in core to meet our agreed policy.

      Quote:
      The objective of this technique is to demonstrate how to use a title attribute on an anchor element to provide additional text describing a link. The title attribute is used to provide additional information to help clarify or further describe the purpose of a link. If the supplementary information provided through the title attribute is something the user should know before following the link, such as a warning, then it should be provided in the link text rather than in the title attribute.

      Because of the extensive user agent limitations in supporting access to the title attribute, authors should use caution in applying this technique. For this reason, it is preferred that the author use technique C7: Using CSS to hide a portion of the link text (CSS) or H30: Providing link text that describes the purpose of a link for anchor elements.

      http://www.w3.org/TR/2012/NOTE-WCAG20-TECHS-20120103/C7
      http://www.w3.org/TR/2012/NOTE-WCAG20-TECHS-20120103/H30.html

      This needs to be done in a way that supports translators - not by joining strings.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: