DEV Community

Discussion on: Headless-UI "Fully Accessible" - it's not your fault you believe the 💩 BS 💩 [accessibility rants]

Collapse
 
riobrewster profile image
RioBrewster

OK so here's my accessibility rant.

I work for a government agency so I have been in the trenches on this for awhile. I'm also a UI/UX designer. I also work closely with a non-dev designer. I have been an advocate for accessibility.

I totally agree that if you use html semantics, add alt tags, validate your code and watch for contrast issues.

But lately I have been increasingly frustrated with the "requirements" for accessibility. Previously there was an understanding that there was the letter of the law and the spirit of the law. Often there are gray areas.

But now the definition of disability has been expanded to include cognitive disabilities and the standard has become that ALL users have to experience every feature the same way. Plus everyone needs to use the site on any device.

I would argue that these definitions are so broad and so vague that it is becoming impossible to provide an optimal experience for anybody! In the mean time, the code base has grown bloated and hard to manage because of all the aria junk we're told is necessary.

Why do all users need to be able to experience every aspect of the UI the same way?

I have a site where, on mobile, the navigation is basically a table of contents using links and lists. Simple. Semantic. Even works without javascript. On desktop, we provide a typical dropdown menu.

This passed accessibility muster two years ago and there is now a robust website built on that codebase.

But a year later, the mobile version isn't enough for people using a screen reader. Even though every page can still be accessed by everyone, the screen reader user apparently needs to know when the menu is open or closed.

If the semantics are done properly that's irrelevant. The user can still decide whether or not they want to enter the nested list of options. They can still get to every page on the site.

But OK - accessibility is important. So down the rabbit hole of WCAG and Aria we go. I totally agree that aria should not be used to override semantics.

So why does WAI tell me that a list item has role=none?

It has to do with whether or not navigation menus are really menus. I. DON'T. CARE. Just tell what will work.

I could go on but I have a meeting where we will discuss the difference between WCAG requirements and coding best practices. Should be fun.