E-mail List Archives
Thread: Are headless Drupal pages accessible?
Number of posts in this thread: 3 (In chronological order)
From: John P. Lee
Date: Wed, Jun 06 2018 7:13PM
Subject: Are headless Drupal pages accessible?
No previous message | Next message →
Hi all,
I was recently asked about the accessibility of headless Drupal by a web designer for a company that wants to ensure that their website design is accessible from the start. As you can see in their message below, they are wondering if they should be concerned about the fact that headless Drupal relies on Javascript to render and serve content. Should that be a deterrent for them? In looking through some of the WebAIM message archives, it seems as though most screen reader users have Javascript enabled nowadays, so using headless Drupal would not appear to be a problem. Is that indeed the case? Does this fall under "best practice"? (Please see the designer's message below):
"We're debating headless Drupal, vs. Decoupled Drupal, vs. traditional coupled Drupal. Here's some info on these three architectural styles https://www.coredna.com/blogs/headless-vs-decoupled-cms
We're wondering about the accessibility of headless Drupal because it relies on javascript to render and serve content.
We found these accessibility guidelines published by WebAim at https://webaim.org/techniques/javascript/
While WCAG 1.0 from 1999 required that pages be functional and accessible with scripting disabled, WCAG 2.0 [Which became the ISO standard in 2012] and all other modern guidelines allow you to require JavaScript.
Which seems to indicate that requiring javascript does not pose an accessibility problem.
... Does it?
In other words, if nothing on a web page were to load when a visitor has javascript disabled (or when their browser doesn't process javascript at all), would that be an accessibility liability, or would we be meeting the accessibility requirements if we choose to only serve content to visitors with javascript enabled?
Thanks,
John
From: JP Jamous
Date: Thu, Jun 07 2018 4:45AM
Subject: Re: Are headless Drupal pages accessible?
← Previous message | Next message →
John,
I did not get a chance to check out the links you provided, but I want to answer your basic question about JS generally.
So many frameworks now use JS to render content. Angular and Node.JS even run server-side, depending on their implementation. So the rule of thumb of turning JS off is dead. If you turn JS in your browser, you won't get much content out of responsive sites.
The important fact to note here is how JS is being rendered and how AT will interact with it. Angular and React would not provide any feedback to an AT if not coded properly. Even keyboard focus won't work if React is not coded with that in mind.
ARIA might be enough for the CMS you will be using. Other components might require some tweaking to make them accessible. That will be something you have to research before deciding on the CMS.
Can I modify components if I have to?
How many of those components render properly in the browser DOM?
How are tables, forms and headings handled through this CMS? Usually, those 3 fail the most.
Those are the questions that would help set you on the right path. Do not be concerned about if the user has JS turned on or off. That's a thing of the past.
--------------------
JP Jamous
Senior Digital Accessibility Engineer
E-Mail Me |Join My LinkedIn Network
--------------------
From: Philip Kiff
Date: Thu, Jun 07 2018 6:06AM
Subject: Re: Are headless Drupal pages accessible?
← Previous message | No next message
Headless Drupal refers to the idea of using Drupal for your "back end"
or database/API and using something else for your "front end" that
renders the site content into HTML. If you remove Drupal's (very
accessible!) front end and replace it with your own, then making your
front end accessible becomes your responsibility. And whether your front
end is accessible is then entirely up to you and your team, not Drupal.
John P. Lee wrote:
> We're wondering about the accessibility of headless Drupal because it relies on javascript to render and serve content.
It is useful here to distinuguish between client-side scripts and
server-side scripts. I'm not sure that you would absolutely *have* to
use Javascript to generate database calls - you could probably use PHP
and MySQL to make database calls like regular Drupal does. But if you do
use Javascript, then it could run on your server instead of in the
client's web browser. That's up to you and whoever builds your new front
end code.
You could also build an "isomorphic" web application that first tried to
run Javascript in the client browser and then fell back to running it
server-side if the client failed to run it.
I think the Tonight Show may be using an isomorphic version of Headless
Drupal based on React:
https://www.nbc.com/the-tonight-show
You'll notice that if you turn off Javascript, the site loads up just
fine, it just doesn't display all the moving parts with their bells and
whistles. But making it work well in both those browser cases is A LOT
of work, I am sure.
John P. Lee wrote:
> In other words, if nothing on a web page were to load when a visitor has javascript disabled (or when their browser doesn't process javascript at all), would that be an accessibility liability, or would we be meeting the accessibility requirements if we choose to only serve content to visitors with javascript enabled?
On 2018-06-07 6:45 AM, JP Jamous wrote:
> Do not be concerned about if the user has JS turned on or off. That's a thing of the past.
I think JP is right that a lot of the accessibility questions related to
whether your site functions without Javascript may be less of an
accessibility barrier now. And guidelines and checklists are changing to
reflect that.
However, if a site does not function without Javascript, then it may
fail in various other ways: you will certainly lose some percentage of
visitors because a site that requires Javascript can cause problems for
people accessing your site using ad blockers, older cellphones, or
slower connections. The best sites continue to ensure that they work
well without Javascript.
It is definitely worth asking whether Headless Drupal is the right
choice for your project, if your team is worried about whether it can
build an accessible, usable front end that doesn't require client-side
javascript.
Phil.
Philip Kiff
D4K Communications