Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

NextJS could just create alt="" when rendering the HTML <img> element from their <Image> element.


Next.js can't determine what the value of the alt tag should be, i.e. whether it should actually be empty. If it would do this, it would actually tell screen reader users that the image is decorative, instead of warning them that there might be information conveyed in the image that the developer forgot to label.


Frameworks shouldn't be changing the content you coded on the sly, that's just asking for trouble. Imagine trying to debug that.


I think the compromise would be an optional build parameter that allows this functionality.


That could harm the experience for assistive tech users more than no alt tag




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: