Re: Developer support

I would strongly encourage component libraries because while, as the
previous respondents said, they cannot cover everything, they can provide
shell components that at least have the basics right.

If a library hide/reveal button, for example, has aria-expanded on it, and
includes the necessary JavaScript to go with it, that is a component that
doesn't have to be reinvented. And it take care of the most common
developer fault on these buttons which is that the JavaScript developer
doesn't code it right and the true/false values of that  aria-expanded
don't keep in step with what's happening on screen.

But to show what is still needed, you can set a default value to false in
the component's HTML so it has that on page load (since most things start
of collapsed initially), but you still need a sentence in the library
documentation to remind the users (i.e. the developers) to set it to true
in the HTML on the rare occasions when the content starts off revealed on
page load!

I audited a component library recently. It was for these survey forms where
you click a value 1 to 10 to rate things. It had components with 3 rows of
10 radio buttons, and a similar one for checkboxes. When I came to switch
my screen to Windows High Contrast mode (a standard test I do that often
shows up accessibility issues) I suddenly saw banks of these things with
every single checkbox and radio button apparently selected! It was like
being hit between th eyes by a sledgehammer! (I'll leave the reader to work
out how that issue could happen, as a fun exercise!)

My point there is that I told them how to fix it once, and they fixed it
once, so now anyone using that library has a robust set of components that
won't make that mistake again.

You can also set default CSS values as well, like making sure the default
for all text in your library components is a decent well contrasting and
WCAG compliant grey colour (for white pages). You can't stop developers
overriding that, but you can at least start them off the right way and hope
they don't bother to change it!

Furthermore, in the documentation you can give detailed instructions to the
developers about what additional things they need to do themselves (like
giving meaningful labels, how to craft correct alt texts etc). Also on what
to avoid (like changing the default text colour to a non-compliant light
grey).

So yes, component libraries are excellent, providing their own
accessibility is fully debugged first of course. That way all the
developers can use the components properly even if they themselves don't
know a lot about accessibility (which most don't).

Received on Thursday, 22 July 2021 13:00:10 UTC