-
Bug
-
Resolution: Done
-
Minor
-
3.6.0
-
-
MOODLE_36_STABLE
-
MOODLE_37_STABLE
-
Moodle App 3.7.0
If you create a couple of core-icons (one example using Ionic icon, one example using FontAwesome) and insert them somewhere suitable, such as just inside the start of the ion-list in core-sitehome-index.html:
<ion-item>
|
<core-icon name="trash" item-start label="I am a frog"></core-icon>
|
Icon 1
|
</ion-item>
|
<ion-item>
|
<core-icon name="fa-star" item-start label="I am also a frog"></core-icon>
|
Icon 2
|
</ion-item>
|
The icons display correctly. However, the resulting HTML for each icon looks like this (excerpt):
<ion-icon role="img" class="icon icon-md ion-md-trash" aria-label="trash" name="trash" item-start="" ng-reflect-name="trash"></ion-icon>
<ion-icon class="icon fa fa-star" aria-label="I am also a frog" name="fa-star" item-start=""></ion-icon>
The FontAwesome icon includes the specified aria-label value, but the Ionic icon does not. This is because the Ionic ion-icon is a 'real' one wired up using Angular and there is code in the <ion-icon> which overrides the aria-label. The FontAwesome ion-icon is a 'fake' one created in the DOM which is not connected to an Angular component, so the manual code in core-icon which sets the aria-label is not overridden.