Hacker News new | past | comments | ask | show | jobs | submit login

You're right that placeholder may do more harm than good and it's questionable if it makes any sense. Still considered it a better option though at that point

As an accessibility advocate, I always highly appreciate accessibility-first libraries. Thank you :)

I agree with Nadya. Wrong or false labels do in fact cause more harm than good. I understand that you want to provide sane default, but I would rather encourage people to edit the labels themselves (maybe add a message box somewhere).

I've also tested an example icon with Firefox + NVDA (inline SVG), which leads to the following screen reader announcement:

    Add Icon of a plus sign enclosed in a circle  graphic
This has multiple issues from the accessibility perspective:

1. IF you are using a title + description, use aria-labelledby for the main label (= title) and aria-describedby for the description. Right now there is no separation and both labels will be read without a pause, making no sense (what is an "add icon of a plus sign .."?).

2. I would advice against using a description altogether. A screen reader user does not care about how the icon looks. He/she cares about the action it performs. So here, "Add" (depending on the context) is more than enough. As a general tip: Screen reader users should have access to the same information as sighted users. That's why we don't describe decorative images for example (alt=""), because there is no information behind it.

3. "Icon of" is unnecessary. As you can see in the NVDA output, when using "role=img" the user already knows it's an graphic. Hence, "Icon of" or "Image of" should not be used in image descriptions.

4. Keep in mind, there are still some issues with SVGs and screen readers to think about [1]. Therefore I also prefer to use the labels on the enclosing elements (buttons, links) instead.

I hope, you find my tips helpful. Keep up the good work!

[1] https://haltersweb.github.io/Accessibility/svg.html

Would need data about whether or not people are more or less likely to

1) Add text when it is missing but the attribute is there to serve as a reminder


2) Change text when it is wrong

Neither one is "wrong" but one might be better than the other.

100% agree. Right then I was just blindly guessing ;)

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