Theme colour switcher

Blog

One of my clients is a site which has extensive audio recordings. Their current site uses the default HTML5 audio player, but they want something that is more customizable to fit with their design and needs. One of their requests was to be able to set audio playback speed. One of my priorities was that the audio player be fully accessible. To display the audio player, they are using the Drupal…

Continue reading How I customized jPlayer for accessibility and added playback rate control, Drupal 9

The Drupal Responsive Background Image module is a nice little module that gives you a preprocess function to display an image field as a, you guessed it, responsive background image. This is useful for hero images, when you want the image to display at different sizes on different-size screens, because you don't want to load an enormous 2000+-pixel-wide image on mobile screens. The creator of…

Continue reading How to use Responsive Background Image in a page or node template

Just plopping this here for future reference and in case it might be useful to someone. I'm having to work with a platform which shall remain unnamed but whose code makes working with it very difficult. Among other things, it gives form elements unique classes with ID numbers, but for some reason no IDs. So I needed to filter the class list to find the unique class so I can set the element's ID…

Continue reading JavaScript function to find a class on an element containing a particular string

Today I had an interview for a job. These days I'm not really job hunting; I have enough freelance work, though it'd be nice to get more hours. A recruiter reached out through LinkedIn and I was interested enough to follow up. The interview was short, and I have been through enough of them in my working life to know by the way they wrapped it up that they wouldn't be going further. Unlike most…

Continue reading Potential vs. fixed mindset

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…

Continue reading Allow users to update an entity's Workflow status from a Drupal view

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". For more on working with Smart Date timezones, see "Drupal & Twig: How to show Smart Date dates in the created timezone, without conversion to site default or user-chosen timezone". That post deals with core Drupal Date and Daterange fields.…

Continue reading Print raw values from Smart Date fields in Twig templates - Drupal 8+

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…

Continue reading "Learn more" or "read more" links: bad news for accessibility

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. For example: 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'…

Continue reading Multiple form inputs for one piece of data: bad news for accessibility

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…

Continue reading Accessible wording for form submit buttons

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…

Continue reading Should a site's linked logo include the word "Home" in the label?