Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Setting the "alt" tag on a button icon

    Is there a way to set the alt tag on a button icon?

    #2
    You can set a hover for the whole button via button.prompt. We haven't set up a way to have a distinct hover or alt tag on the icon, since it's just a presentation element (it's actually explicitly marked that way for accessibility purposes). What problem are you trying to solve that led to this question?

    Comment


      #3
      I have a disabled client that uses a screen reader and he has says it reads the filename of the icon in the button. But I guess it shouldn't do that if it is marked as a presentation element.

      He suggested adding an empty alt tag to the icon to avoid this.

      Comment


        #4
        I have spoken again with my client and they say that it is best to have an empty alt tag as well as the "presentation" role, since the "presentation" role is not supported in all browsers and screen readers.

        Comment


          #5
          Unfortunately, empty alt tags create other issues for other screen readers, such as causing aria-label to be ignored.

          We don't know of any modern combination of screen reader and browser where the ARIA presentation role is ignored - where are you seeing that?

          Comment

          Working...
          X