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

Fontawesome should use <span> instead of <i>

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.11.1
    • Fix Version/s: None
    • Component/s: General, Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_311_STABLE

      Description

      Currently, Moodle renders fontawesome icons using the <i> tag. Although the fontawesome docs do offer that option, the preferred, semantically correct way is to use a <span> tag.
      The Fontawesome docs say:
      "Font Awesome is designed to be used with inline elements, and we recommend sticking with a consistent HTML element to reference them by in your project. We like the <i> tag for brevity and because most folks use <em></em> for emphasized/italicized semantic text these days. If that’s not your cup of tea, using a <span> is more semantically correct."
      We should really be using the <span> tag to be correct. The <i> tag is still a valid tag, regardless of the use of <em>.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mchurch Mike Churchward
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Huong Nguyen, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: