Skip to content

Accessibility: Codemod from `<MdiIcon />` to `<Icon svgPath={mdiPath} aria-(hidden|label) />`

Warren Gifford requested to merge tr/icon-codemod-v3-1 into main

Created by: umpox

Migration automated through codemod: https://github.com/sourcegraph/codemod/pull/148

Description

Migrates simple <MdiIcon /> usage directly from mdi-react to the <Icon /> Wildcard component and @mdi/js icon content.

Changes:

  • Ran codemod to automatically update all direct usage of this icons
  • Manually added aria-label attributes where relevant.

Also closes some accessibility issues: Closes https://github.com/sourcegraph/sourcegraph/issues/35183

Test plan

Icon edge cases tested through https://github.com/sourcegraph/sourcegraph/pull/37387, this diff is tested through automated tests.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading