Question · Angular course · Module 12: Security and Performance

The aria-label attribute

Why do we add aria-label to a button that contains only an icon (e.g. <mat-icon>delete</mat-icon>)?

Answer options

  • To change the icon color
  • So the screen reader reads out the visually hidden description of the action
  • To speed up rendering of the button
  • To disable the button for the mouse

You can check the correct answer by solving this task in the CodeWorlds game.