LIT-EIA / adapt-esdc-accessibilityfixes

Extension to load and run a .js file when a course loads
GNU General Public License v3.0
5 stars 2 forks source link

if role="img" and aria-label is empty, need to add aria-hidden = true [RDI 2.16] #40

Closed LIT-EIA-OWNER closed 3 years ago

LIT-EIA-OWNER commented 3 years ago

This may be a false positive with the JavaScript fix. Elements with role="img" must have alternative text. role-img-alt Path div[aria-label=""] Snippet <div class="aria-label" role="img" aria-label=""></div>

LIT-EIA-OWNER commented 3 years ago

added to altFixes function

$('div[role="img"]').each(function() { if ($(this).attr('aria-label') == "") { $(this).attr('aria-hidden', true); } });

LIT-EIA-OWNER commented 3 years ago

Menu images alt tags gets moved to an extra div with role img. need to move the alt data back into the image's alt