Accessibility: Add missing alt attribute on decorative images

- Quick create
- Global search
- Breadcrumbs
This commit is contained in:
Molkobain
2021-06-12 11:32:42 +02:00
parent dd8a51ea1b
commit 485262ec0a
3 changed files with 6 additions and 3 deletions

View File

@@ -84,7 +84,8 @@ $(function()
}
else if (oEntry['icon'].length > 0)
{
sIconSpec = '<span class="ibo-breadcrumbs--item-icon"><img src="'+oEntry['icon']+'"/></span>';
// Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/
sIconSpec = '<span class="ibo-breadcrumbs--item-icon"><img src="'+oEntry['icon']+'" alt=""/></span>';
}
var sTitle = oEntry['description'],

View File

@@ -24,7 +24,8 @@
{% for aQuery in oUIBlock.GetLastQueries() %}
<a href="{{ aQuery.target_url }}" class="ibo-global-search--compartment-element" data-role="ibo-global-search--compartment-element" data-query-raw="{{ aQuery.query }}" title="{{ aQuery.query }}">
{% if aQuery.icon_url is defined %}
<img src="{{ aQuery.icon_url}}" class="ibo-global-search--compartment-element-image">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img src="{{ aQuery.icon_url}}" alt="" class="ibo-global-search--compartment-element-image">
{% endif %}
{{ aQuery.label_html|raw }}
</a>

View File

@@ -28,7 +28,8 @@
{% for aClass in oUIBlock.GetLastClasses() %}
<a href="{{ aClass.target_url }}" class="ibo-quick-create--compartment-element" data-role="ibo-quick-create--compartment-element" data-class-code="{{ aQuery.class }}">
{% if aClass.icon_url is defined %}
<img src="{{ aClass.icon_url}}" class="ibo-quick-create--compartment-element-image">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img src="{{ aClass.icon_url}}" alt="" class="ibo-quick-create--compartment-element-image">
{% endif %}
{{ aClass.label_html|raw }}
</a>