Skip to content

Hide logo images from accessibility tree

What does this MR do and why?

Unauthenticated header logo SVG graphic reads filepath, hide image graphic from accessibility tree with alt="".

See findings and recordings from new navigation accessibility screen reader review &11510

Hide logo images from accessibility tree:

  • Add alt: '' to image logo
  • Add aria-hidden="true" to SVG logos
  • Add aria-label="Homepage" to wrapping link

Screenshots or screen recordings

Before After
CleanShot_2023-10-09_at_16.12.37_2x CleanShot_2023-10-09_at_16.22.00_2x
CleanShot_2023-10-09_at_16.31.02 CleanShot_2023-10-09_at_16.32.25

How to set up and validate locally

  1. Open GDK in incognito window
  2. Go to publically accessible page e.g. http://gdk.test:3000/flightjs/Flight/-/merge_requests/4
  3. Review logged out marketing header accessibility tree (Chrome | Firefox)
  4. Logo image should be ignored, wrapping link should provide context and label "Homepage"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #426363 (closed)

Edited by Scott de Jonge

Merge request reports