0

When specifying empty alt text on an image, is there any difference to screen reader users if the alt is rendered as alt or if is rendered as alt="" in the HTML?

scuds
  • 73
  • 1
  • 8
  • No, there's no difference. Both are ignored. It's empty. That's what matters. – Roko C. Buljan Feb 05 '18 at 21:58
  • Wouldn't it be the same? Similar situation to when you do `required` compared to `required="required"`? – Andy Holmes Feb 05 '18 at 21:58
  • 2
    @AndyHolmes — `required` is a boolean attribute, `alt` is not. – Quentin Feb 05 '18 at 22:01
  • 1
    @AndyHolmes not exacly. `required` and `required="required"` are both accepted as *Required*, while having `alt` is like not having it. – Roko C. Buljan Feb 05 '18 at 22:01
  • @RokoC.Buljan - I'm not sure that's correct. NVDA treats alt and alt="" the same (ignoring the image completely); whereas an image without any alt is read as "blank" - so it's not quite the same as not having it. – J. Afarian Feb 05 '18 at 23:20

0 Answers0