1

In my page has a dialog form. In dialog has a button close. The close button may not be obvious to the visually impaired. I wants user to hear “close the dialog” when focusing on the close button in the dialog. But not using a source audio file.

My friend has suggest use HTML ARIA. Anyone can help me. Thanks!

thinhnk
  • 351
  • 3
  • 12

1 Answers1

0

You could use aria-label.

Taken from this example from MDN:

<button aria-label="Close" onclick="myDialog.close()">X</button>

Also explained in this SO answer

Community
  • 1
  • 1
McVenco
  • 1,011
  • 1
  • 17
  • 30
  • ok, i understood aria attr. could you suggest to me any screen reader which can play sound. I have install Thunder Screenreader, but look like it not work fine. Thanks – thinhnk Dec 17 '15 at 13:45
  • I don't actually have experience with screenreaders, only some knowledge of coding for it in HTML... – McVenco Dec 17 '15 at 13:58