November 3, 2023
Background: I work on a site with different groups of users, to manage which we use not only core Drupal roles and permissions, but the Group module. Recently the site owner requested to add a Workflow to a content type. Clients need to be able to see the workflow state and change it, but not be able to see or edit the original node, or even the workflow tab on the node.
We manage client access…
Allow users to update an entity's Workflow status from a Drupal view
October 26, 2023
This is a followup to my post "Print formatted date with correct timezone from datetime or daterange field in node and Views templates - Drupal 8".
That post deals with core Drupal Date and Daterange fields. Recently I've been working on a site with events which use a Smart Date field. The Smart Date module offers many features that core Drupal date fields don't, such as recurrence.
Print raw values from Smart Date fields in Twig templates - Drupal 8+
April 5, 2023
A very common website pattern is a list of teasers for blog posts or articles, each with a heading, short text extract, maybe an image, and a link whose text label is something like "Read more" or "Learn more".
Those "read more" links are very bad news for accessibility, mainly for blind users.
Why? Blind users often hear links out of context. This may happen by tabbing through focusable elements…
"Learn more" or "read more" links: bad news for accessibility
March 30, 2023
During lived user accessibility testing, one pattern I've repeatedly found to be a problem for blind users is multiple inputs for one piece of data.
A Canadian postal code with separate inputs for each character
A driver's license number with three inputs, one for each set of five characters
A credit card date with separate inputs for month and year
Why is this done? Typically, it'…
Multiple form inputs for one piece of data: bad news for accessibility
March 21, 2023
Recently I've been doing a lot of lived user accessibility testing, which involves observing people with disabilities using assistive technology to perform specific tasks on websites or apps. The goal is to identify the issues they encounter so the site owner can remedy them.
One issue I've frequently observed, which was totally unexpected for me, is uncertainty and confusion on the part of blind…
Accessible wording for form submit buttons
February 15, 2023
It's a nearly universal pattern in websites: the organization logo in the top left corner of the page, usually a link to the site homepage. But what text label should that link have?
How the label is provided isn't what we're dealing with here (usually it's by alt text on the logo graphic), but its wording.
Normally, I counsel developers and content editors to only include the visible text in an…
Should a site's linked logo include the word "Home" in the label?
December 20, 2022
Recently I discovered an odd Drupal Views bug. While testing a view I realized that content it should have shown was missing from one display. After a lot of testing, it turned out it was due to two relationships to content in entity reference fields on the content type my view displays. These fields were empty in the missing nodes. Removing the relationships or adding content to those fields…
Drupal views doesn't show content if entity reference field relationship is empty
April 26, 2022
Yesterday I had an interview for a front-end developer contract. The job would have involved overseeing a small front-end team rebuilding a suite of marketing sites on a strict deadline, specifically focused on improving performance.
I asked about the client's commitment to accessibility, and whether that was part of their redevelopment plan, only to be told no, it wasn't. Meeting their deadline…
Why I turned down a job for a client not interested in accessibility
November 17, 2021
Anyone who has read this blog before knows that I love the Drupal Group module. It has a companion module, Entity Group Field (not yet stable), which makes it even more useful. This adds a field to entities which allows you to add them to groups on their edit form, rather than having to go separately to the group to add them.
Here's how to print the rendered value of that field in node.html.twig…
Print entity group field value in node.html.twig and configure display modes
September 16, 2021
The title of this post might seem a little surprising. Isn't alternative text supposed to describe the image?
That's the concept that's drilled into us, and it's what most people think of when writing alt text. However, in some situations, it's actually wrong. One of those situations is when the image is serving as the visible content of a control, such as a link or button which does not also…
Linked image alt text should not describe the image