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

I handle ADA issues at work and deal with updating sites to adhere to WCAG 2.0. So perhaps I can offer my $0.02 and clear this up.

It is actually impossible for anything to be accessible out-of-the-box, but they have been designed to be accessible and have sane defaults. Those statements do not contradict one another.

For example, if you use a magnifying glass icon to mean "zoom" but their default title text for a magnifying glass is "search" then it is not out-of-the-box accessible even though it was designed to be fully accessible. They even mention this scenario (generically, not specifically) in their disclaimer.

>E.g. all the titles and descriptions given to the icons should be treated as placeholders and changed in implementation depending on an actual role of each icon. In many cases, you may not need them altogether

Having the placeholders there is questionably good - it would be better to have the attributes there but blank in my opinion. It will do more harm than good being wrong than being blank, but that's a difference in preference for implementation.

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