Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstractions make it easy for things to fall through the cracks #36

Open
jlengstorf opened this issue Jun 4, 2018 · 0 comments
Open

Comments

@jlengstorf
Copy link
Owner

This got cut from another article, so I'm tracking it here for publication later.

Abstractions make it easier for things to slip through the cracks

A much bigger risk of using abstractions is the removal of developers further from what actually happens in their apps. Using a framework like Angular or React makes it possible to build apps extremely quickly, but it can also mean we never even notice we’re creating non-semantic, inaccessible content.

As a contrived example, let’s take a look at this React code:

const App = () => (
  <Wrapper>
    <Title>Hello Friends!</Title>
    <Subtitle>Doesn’t this look semantic?</Subtitle>
  </Wrapper>
);

From a DX perspective, this is great. We see right away that our app displays a title and a subtitle, and if our job was to edit one of those, it would take little effort to figure out how to do it.

Underneath this abstraction, however, there’s trouble. The developers who wrote this code weren’t thinking about semantics or accessibility, so the final result of this code is a mess of div soup:

<div id="root"><div class="css-1jm59wz"><div class="css-xb3uqj">Hello Friends!</div><div class="css-18fjbby">Doesn’t this look semantic?</div></div></div>

Through no malice or ill intent, we’ve created a poor user experience because our abstraction didn’t take semantics into consideration.

In some cases, like open source projects, these oversights will be patched by the community as they’re caught, so all we have to do is keep our frameworks up to date. This is one of the strengths of using community-powered tools.

When we use a given tool or framework to improve our DX, we’re at the whim of the developers who work on it. If they never prioritize accessibility, our users will suffer for the sake of our DX. This puts us in a difficult situation: we can give up the improved DX — and the productivity and job satisfaction it provides — in favor or improving the UX of our app, or we can let our users suffer so our jobs are easier.

If we find ourselves making choices about who must suffer — the developer or the user — it’s a strong signal that DX and UX got out of alignment somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant