Hacker News new | ask | show | jobs
by Alexandervn 4847 days ago
No so clean to me, without an 'alt'-attribute..
2 comments

alt is beside the point here
It's a fair point, though. The href attribute tends be very long, so if your criteria is readability, do you opt for attribute soup or put it in a wrapper div or span? It's a subjective decision, and I don't think there's a right or wrong answer, but examples should reflect real world situations.

Either way, I think href should be a universal attribute (obviously, it wouldn't make sense on something like br). It offers a lot of flexibility and is probably no more subject to abuse than anything else. I don't see how browsers would have a problem implementing it. Just look at the 3D view of a complex page in the Firefox Inspector to get an idea of what they're already coping with.

I assure you that every useful implementation of an HTML Parser--apart from validation tools--will handle the missing alt just fine, regardless of what the spec says.
It leads to radically different behaviour in screen-readers, at least, and they most certainly are useful implementations.