Demystifying Screen Readers: Accessible Forms & Best Practices

This is the 3rd post in a small series we are doing on form accessibility. If you missed the 2nd post, check out Managing User Focus with :focus-visible. In this post we are going to look at using a screen reader when navigating a form, and also some best practices.

What is a Screen Reader?

You may have heard the term “screen reader” as you have been moving around the web. You might even be using a screen reader at this moment to run manual accessibility tests on the experiences you are building. A screen reader is a type of AT or assistive technology.

A screen reader converts digital text into synthesized speech or Braille output, commonly seen with a Braille reader.

In this example, I will be using Mac VO. Mac VO (VoiceOver) is built-in to all Mac devices; iOS, iPadOS, and macOS systems. Depending on the type of device you are running macOS on, opening VO could differ. The Macbook Pro that is running VO I am writing this on doesn’t have the touch bar, so I will be using the shortcut keys according to the hardware.

Spinning Up VO on macOS

If you are using an updated Macbook Pro, the keyboard on your machine will look something like the image below.

You will start by holding down the cmd key and then pressing the Touch ID three times quickly.

MacBook Pro Keyboard with steps on how to start mac voiceover.

If you are on a MBP (MacBook Pro) with a TouchBar, you will use the shortcut cmd+fn+f5 to turn on VO. If you are using a traditional keyboard with your desktop or laptop, the keys should be the same or you will have to toggle VO on in the Accessibility settings.. Once VO is turned on, you will be greeted with this dialog along with a vocalized introduction to VO.

Welcome to VoiceOver dialog when opening up voiceover.

If you click the “Use VoiceOver” button you are well on your way to using VO to test your websites and apps. One thing to keep in mind is that VO is optimized for use with Safari. That being said, make sure when you are running your screen reader test that Safari is the browser you are using. That goes for the iPhone and iPad as well.

There are two main ways you can use VO from the start. The way I personally use it is by navigating to a website and using a combination of the tab, control, option, shift and arrow keys, I can navigate through the experience efficiently with these keys alone.

Another common way to navigate the experience is by using the VoiceOver Rotor. The Rotor is a feature designed to navigate directly to where you want to be in the experience. By using the Rotor, you eliminate having to traverse through the whole site, think of it as a “Choose Your Own Adventure”.

Modifier Keys

Modifier keys are the way you use the different features in VO. The default modifier key or VO is control + option but you can change it to caps lock or choose both options to use interchangeably.

VoiceOver utility to change the modifier keys.

Using the Rotor

In order to use the Rotor you have to use a combination of your modifier key(s) and the letter “U”. For me, my modifier key is caps lock. I press caps lock + U and the Rotor spins up for me. Once the Rotor comes up I can navigate to any part of the experience that I want using the left and right arrows.

VoiceOver rotor feature showing the Headings navigation.
Using the Rotor in VoiceOver

Another neat way to navigate the experience is by heading level. If you use the combination of your modifier keys + cmd + H you can traverse the document structure based on heading levels. You can also move back up the document by pressing shift in the sequence like so, modifier keys + shift + cmd + H.

Using the Heading Level Shortcut with VoiceOver

History & Best Practices

Forms are one of the most powerful native elements we have in HTML. Whether you are searching for something on a page, submitting a form to purchase something or submit a survey. Forms are a cornerstone of the web, and were a catalyst that introduced interactivity to our experiences.

The history of the web form dates back to September 1995 when it was introduced in the HTML 2.0 spec. Some say the good ole days of the web, at least I say that. Stephanie Stimac wrote an awesome article on Smashing Magazine titled, “Standardizing Select And Beyond: The Past, Present And Future Of Native HTML Form Controls”.

The following are 5 best practices to follow when building an accessible form for the web.

  1. Make sure that you are using a form element. Forms are accessible by default and should be used over div’s at all times.
<form>
  <!-- Form controls are nested here. -->
</form>
  1. Be sure to use the for and id attributes on label’s and input’s so that they are linked. This way, if you click/tap the label, focus will shift to the input and you can start typing.
<label for="name">Name:</label>
<input type="text" id="name" name="name" required aria-required/>
  1. If a field is required in order for the form to be complete, use the required attribute and the aria-required  attribute. These will restrict the form from being submitted. The aria-required attribute explicitly tells the assistive tech that the field is required.
<input type="text" id="name" name="name" required aria-required/>
  1. Use the, :focus, :focus-within and :focus-visible CSS pseudo classes to manage and customize how a user receives focus.
form:focus-within {
 background-color: #cfffcf;
}

input:focus-within {
 border: 10px solid #000000;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
 outline: 2px solid crimson;
 border-radius: 3px;
}
  1. A button is used to invoke an action, like submitting a form. Use it! Don’t create buttons using div’s. A div by definition is a divider. It has no inherent accessibility properties.

Demo

Navigating a Web Form with VoiceOver

If you want to check out the code, navigate to the VoiceOver Demo GitHub repo. If you want to try out the demo above with your screen reader of choice, check out Navigating a Web Form with VoiceOver.

Screen Reader Software

Below is a list of various types of screen reader software you can use on your given operating system. If a Mac is not your machine of choice, there are options out there for Windows and Linux, as well as for Android devices.

NVDA

NVDA is a screen reader from NV Access. It is currently only supported on PC’s running Microsoft Windows 7 SP1 and later. For more access, check out the NVDA version 2024.1 download page on the NV Access website!

JAWS

“We need a better screen reader”

– Anonymous

If you understood the reference above, you are in good company. According to the JAWS website, this is what it is in a nutshell:

“JAWS, Job Access With Speech, is the world’s most popular screen reader, developed for computer users whose vision loss prevents them from seeing screen content or navigating with a mouse. JAWS provides speech and Braille output for the most popular computer applications on your PC. You will be able to navigate the Internet, write a document, read an email and create presentations from your office, remote desktop, or from home.”

JAWS website

Check out JAWS for yourself and if that solution fits your needs, definitely give it a shot!

Narrator

Narrator is a built-in screen reader solution that ships with WIndows 11. If you choose to use this as your screen reader of choice, the link below is for support documentation on its usage.

Complete guide to Narrator

Orca

Orca is a screen reader that can be used on different Linux distributions running GNOME.

“Orca is a free, open source, flexible, and extensible screen reader that provides access to the graphical desktop via speech and refreshable braille.

Orca works with applications and toolkits that support the Assistive Technology Service Provider Interface (AT-SPI), which is the primary assistive technology infrastructure for Linux and Solaris. Applications and toolkits supporting the AT-SPI include the GNOME Gtk+ toolkit, the Java platform’s Swing toolkit, LibreOffice, Gecko, and WebKitGtk. AT-SPI support for the KDE Qt toolkit is being pursued.”

Orca Website

TalkBack

Google TalkBack is the screen reader that is used on Android devices. For more information on turning it on and using it, check out this article on the Android Accessibility Support Site.

Browser Support

If you are looking for actual browser support for HTML elements and ARIA (Accessible Rich Internet Application) attributes, I suggest caniuse.com for HTML and Accessibility Support for ARIA to get the latest 4-1-1 on browser support. Remember, if the browser doesn’t support the tech, chances are the screen reader won’t either.

DigitalA11Y can help summarize browser and screen reader info with their article,  Screen Readers and Browsers! Which is the Best Combination for Accessibility Testing?

https://support.apple.com/guide/voiceover/with-the-voiceover-rotor-mchlp2719/mac

https://www.w3.org/TR/wai-aria/

https://www.w3.org/WAI/standards-guidelines/aria/

https://support.google.com/accessibility/android/answer/6283677?hl=en

https://support.google.com/accessibility/android/answer/6283677?hl=en


Demystifying Screen Readers: Accessible Forms & Best Practices originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

7 Best WooCommerce Points and Rewards Plugins

Are you looking for a points and rewards plugin for your WooCommerce store?

Since there are hundreds of reward system plugins available on the market, choosing the right one for your needs can be intimidating.

To help you easily choose the right one for your site, we tested some of the most popular plugins on the market. While testing, we examined different factors like ease of use, features, and pricing.

In this article, we will show you some of the best WooCommerce points and rewards plugins.

Best WooCommerce points and rewards plugins

In a hurry? No worries! Here are our top picks so you can quickly choose the best WooCommerce points and rewards plugin for your site.

RankPluginStandout FeaturePrice
🥇Loyalty Program by Advanced CouponsFeature rich pluginPaid
🥈FunnelKit CartOptimize sales funnelsFree + Paid
🥉YITH WooCommerce Points and RewardsCustomized points systemPaid
4Points and Rewards for WooCommerceBest for startupsFree
5WPLoyaltyPre-built loyalty campaignsFree + Paid
6WooCommerce Points and RewardsClean reward systemsPaid
7GratisfactionFree loyalty program pluginFree

How We Test & Review WooCommerce Points Plugins

A WooCommerce points and rewards plugin allows you to offer incentives to customers with points for their purchases and actions. These points can then be redeemed for different rewards like free products, discounts, free shipping, and other benefits.

Picking the right plugin for your WooCommerce store can be tricky because there are hundreds of options. To help you out, we tested and reviewed some of the best WooCommerce rewards plugins on the following criteria:

  • Hands-on testing – Over the last 16+ years, we’ve tested thousands of WooCommerce plugins. We went through multiple WooCommerce points and rewards plugins and shortlisted the 7 best options.
  • Easy of Use – When testing the plugins, we considered how easy they were to use and configure. We looked for options that were beginner-friendly, offered a simple setup process, and didn’t require coding.
  • Features and Other Benefits – In addition to offering a reward system for your WooCommerce store, we also looked for other features and benefits.

Why Trust WPBeginner?

At WPBeginner, we have over 16 years of experience in WordPress, design, and online marketing. Our team of WordPress experts extensively reviews each plugin that is featured in this article and thoroughly tests them on real websites. To learn more, see our complete editorial process.

That said, let’s look at some of the best WooCommerce rewards and points plugins.

1. Loyalty Program by Advanced Coupons

Loyalty Program for WooCommerce by Advanced Coupons

Loyalty Program by Advanced Coupons is the best WordPress coupon code plugin. It offers a WooCommerce loyalty program feature that makes it very easy to add points and rewards to your online store.

In our testing, the plugin was very easy to set up. The best part is that you can use the default settings out of the box and start a loyalty program within a few minutes.

Advanced Coupons also makes it super simple for customers to keep track of the points they’ve earned. You can add customizable notices to inform customers about their points, how the reward system works, and how they can easily redeem the points at any time.

Redeem points in advanced coupons

Another interesting feature we found during our testing was the different ways you can allow customers to earn points. With a click of a button, you can reward customers for purchasing products, leaving a review, commenting on a blog post, and more.

Besides that, Advanced Coupons offers other features like free gift coupons, BOGO deals, shipping discounts, and more. It also lets you set up conditional logic where a coupon can automatically applied based on products in the cart, subtitle, or recently added products.

Pros:

  • Create a loyalty program within minutes
  • Select how customers can earn points
  • Show personalized notices for points earned
  • Allow customers to easily redeem points
  • View reports of points earned and redeemed

Cons:

  • The loyalty program feature isn’t available in the free version

Why We Recommend Advanced Coupons: After testing different points and rewards WooCommerce plugins, Advanced Coupons is the best option for all types of online stores. It is beginner-friendly and offers lots of features compared to other plugins on the list.

Pricing: You’ll need the Advanced Coupons ‘Plugin Bundles’ plan to access the Loyalty Program option, which will cost $119 per year.

2. FunnelKit Cart

FunnelKit cart

FunnelKit Cart (formerly called WooFunnels) is a user-friendly WooCommerce sales funnel builder. It lets you create high-converting lead pages, upsells, and checkout pages, as well as offer rewards to customers to boost sales.

With FunnelKit, you can gamify the shopping experience for customers. When a user adds items to the cart, they can unlock a special gift when the price reaches a certain threshold. Basically, it lets you add milestone-based rewards and incentives to your WooCommerce cart.

For example, if a customer adds items worth $25, they can enjoy free shipping. If they spend $50 or more, they get an additional 10% discount.

When testing the plugin, we found that it offers 3 types of rewards. These include free shipping, a discount coupon, or a gift.

Besides that, FunnelKit offers other features to boost sales on your online store. For example, you get a template library, pre-built automation options, A/B testing, conversion pixel tracking, integrations, and more.

Pros:

  • Add rewards to your cart
  • Easily optimize your sales funnel for conversions
  • Beginner-friendly to use and set up
  • Seamless integration with other plugins and themes
  • A/B test your sales funnels

Cons:

  • Upsell or cross-sell features are not available in the free version
  • Limited templates in the free version

Why We Recommend FunnelKit Cart: If you’re looking for a WooCommerce plugin that lets you optimize your sales funnel and add a reward system to cart pages, then we highly recommend FunnelKit Cart.

Pricing: FunnelKit Cart prices start from $99.50 per year. There is also a free version you can use to get started.

3. YITH WooCommerce Points and Rewards

YITH WooCommerce points and rewards

YITH WooCommerce Points and Rewards is the next plugin on our list. It helps you create a loyalty program for your online store and reward customers for their actions.

Our first impression was that the plugin would be complicated to use. However, that’s not the case. It is very easy to use and offers different settings to customize the points system.

For instance, you can automatically assign points for each purchase or manually award points to different customers. There are 4 types of points to choose from, which include assigning a fixed amount of points, setting a percentage amount, setting a fixed amount based on product price, or not assigning any points.

Besides that, YITH WooCommerce Points and Rewards offers a bunch of extra points options. You can reward customers when they register, first login, referral link signup, customer’s birthday, and more. The plugin also shows custom banners to encourage users to spend more and collect more points.

Pros:

  • Automatically award points to customers
  • Show custom banners to encourage more points
  • Send email notifications to customers regarding their rewards
  • Allow customers to view and redeem earned points
  • Easily track users and the points they’ve earned
  • Award extra points based on user actions

Cons:

  • There is no free version

Why We Recommend YITH WooCommerce Points and Rewards: It is perfect for anyone who wants to add a reward program to their WooCommerce store. The plugin is very easy to use and offers lots of options to customize the points system.

Pricing: YITH WooCommerce Points and Rewards is a premium plugin that will cost you $139.99 per year.

4. Points and Rewards for WooCommerce

Points and rewards for WooCommerce

Points and Rewards for WooCommerce is a free plugin that offers almost all the features you’d find in a premium plugin to create a loyalty program for your eCommerce store.

For instance, you can award points to customers based on different actions like signing up, clicking a referral link, spending above a specific amount, purchasing a particular product, and more.

One feature that stood out for us was that store owners could assign points on previous orders that were fulfilled before installing this plugin. It’s a great way to increase customer loyalty and boost sales.

Other than that, the plugin also offers different user levels and badges to customers. It even offers a spin-to-win wheels option where users can win more points.

Pros:

  • Simple and easy-to-use plugin
  • Seamless integration with WooCommerce
  • Assign points on previous orders
  • Allow customers to redeem points in the cart or at checkout
  • Membership system for exclusive offers

Cons:

  • Doesn’t offer personalized banners
  • Points expiration and product purchase are not available in the free version

Why We Recommend Points and Rewards for WooCommerce: If you want a free plugin for setting up points and rewards in WooCommerce, then this is the best option. It offers great features that you’d find in different premium plugins.

Pricing: The Points and Rewards for WooCommerce plugin is free to use.

5. WPLoyalty

WPloyalty

WPLoyalty is a powerful WooCommerce rewards and points plugin that allows you to create customized loyalty programs. It offers lots of features and lets you reward customers for multiple actions.

We particularly like the feature of customized campaigns and rewards. The plugin comes with pre-built campaigns that you can use for your WooCommerce store. For example, you can create a campaign for points for purchase, rewards based on spending, writing a review, birthdays, and more.

Besides that, it is very easy to customize each campaign and set the point system. WPLoyalty lets you add different levels to the loyalty program, set an expiration date, send email notifications, and integrate with multi-currency plugins.

The best part is that you can choose from different reward types. These include percentage discounts, free shipping, free products, and more.

Pros:

  • Create customizable loyalty programs
  • Choose from pre-built campaigns
  • Beginner-friendly to use
  • Set expiration date for campaigns
  • Reward customers based on multiple actions
  • Manage customers and points with easy to understand dashboard

Cons:

  • The free version has limited features

Why We Recommend WPLoyalty: It is a perfect plugin for new WooCommerce websites that want a premium points and rewards plugin. The plugin is packed with features and offers affordable pricing plans along with a free version.

Pricing: WPLoyalty prices start from $9 per month. There is also a free version you can use to get started.

6. WooCommerce Points and Rewards

WooCommerce points and rewards

WooCommerce Points and Rewards is a WooCommerce extension that lets you award points for purchases and other actions performed by a user. It is a basic and clean plugin that makes it very easy to set up a loyalty program.

When testing the plugin, we found that you can only redeem the points for discounts. Unlike other WooCommerce points and rewards plugins, there isn’t an option to offer other incentives to customers.

That said, you can define the value of points for each purchase and action. It also lets you control the maximum discount that can be applied to the cart or any product. Plus, the plugin shows a log of all the points earned by customers and lets you manage them from the WordPress dashboard.

Pros:

  • Clean and beginner-friendly plugin
  • Offer points that can redeemed for discounts
  • Easily manage customer points from your dashboard
  • Award points for different user actions
  • Control values of points and discounts

Cons:

  • Lacks features offered by other premium plugins
  • Expensive pricing plan

Why We Recommend WooCommerce Points and Rewards: The plugin is great for WooCommerce store owners who want to offer points to customers that can only be redeemed as discounts.

Pricing: WooCommerce Points and Rewards will cost you $159 (billed annually).

7. Gratisfaction

Gratisfaction

Gratisfaction is another free WooCommerce loyalty plugin. The plugin lets you award points to users based on actions and allow them to redeem the points for discounts.

The best part about using Gratisfaction is that it offers a wide range of customer actions for awarding points. For example, you can offer points for subscribing to an email list, sharing on social media, watching a video, and more.

Besides that, you get pre-built templates to create multiple types of programs, including loyalty programs, instant win campaigns, contests, giveaways, and purchase-to-win campaigns.

Pros:

  • Pre-built campaign templates
  • Reward points based on different actions
  • Create multiple campaigns
  • Lightweight and simple plugin

Cons:

  • Lacks customization options
  • Offers only discounts as rewards

Why We Recommend Gratisfaction: We recommend this plugin to anyone looking for a free WooCommerce loyalty plugin and who wants to create other types of campaigns to boost sales.

Pricing: Gratisfaction is a free WordPress plugin.

Which Is the Best WooCommerce Points and Rewards Plugin?

Overall, we found Loyalty Program by Advanced Coupons to be the WooCommerce points and rewards plugin.

It gives you full control over the points you might want to award for different user actions. For instance, users can earn points for purchasing products, leaving comments, reviewing a product, and more.

Plus, you can offer different incentives like free shipping, free products, discounts, BOGO deals, and other rewards to customers for redeeming their points.

With all these features, affordable pricing plans, a free plugin version, and a beginner-friendly interface, Advanced Coupons is the best solution for creating a loyalty program in WooCommerce.

FAQs about WooCommerce Points and Rewards Plugins

Here are some commonly asked questions about points and rewards plugins for WooCommerce.

1. How do I add reward points in WooCommerce?

There are lots of WooCommerce plugins you can use to create a loyalty program and award points to customers. These can be for performing different actions or purchasing products. We recommend using the Advanced Coupons plugin because it offers a lot of features and is very easy to use.

2. How do I increase sales in WooCommerce?

There are different ways to boost sales in WooCommerce, such as providing discounts, running flash sales or giveaways, and offering points to customers that they can redeem for free prizes.

3. Is Shopify better than WooCommerce?

Shopify is considered to be more user-friendly, but WooCommerce offers more flexibility and features. For more details, please see our comparison of WooCommerce vs Shopify.

Best Guides for Your WooCommerce Store

Here are some additional resources you can go through to take your WooCommerce store to the next level:

We hope this article helped you learn about the best WooCommerce points and rewards plugins. You may also want to see our guide on the best live chat software for small businesses and how much it costs to build a website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 7 Best WooCommerce Points and Rewards Plugins first appeared on WPBeginner.

How To Work With GraphQL In WordPress In 2024

Three years ago, I published “Making GraphQL Work In WordPress,” where I compared the two leading GraphQL servers available for WordPress at the time: WPGraphQL and Gato GraphQL. In the article, I aimed to delineate the scenarios best suited for each.

Full disclosure: I created Gato GraphQL, originally known as GraphQL API for WordPress, as referenced in the article.

A lot of new developments have happened in this space since my article was published, and it’s a good time to consider what’s changed and how it impacts the way we work with GraphQL data in WordPress today.

This time, though, let’s focus less on when to choose one of the two available servers and more on the developments that have taken place and how both plugins and headless WordPress, in general, have been affected.

Headless Is The Future Of WordPress (And Shall Always Be)

There is no going around it: Headless is the future of WordPress! At least, that is what we have been reading in posts and tutorials for the last eight or so years. Being Argentinian, this reminds me of an old joke that goes, “Brazil is the country of the future and shall always be!” The future is both imminent and far away.

Truth is, WordPress sites that actually make use of headless capabilities — via GraphQL or the WP REST API — represent no more than a small sliver of the overall WordPress market. WPEngine may have the most extensive research into headless usage in its “The State of Headless” report. Still, it’s already a few years old and focused more on both the general headless movement (not just WordPress) and the context of enterprise organizations. But the future of WordPress, according to the report, is written in the clouds:

“Headless is emphatically here, and with the rapid rise in enterprise adoption from 2019 (53%) to 2021 (64%), it’s likely to become the industry standard for large-scale organizations focused on building and maintaining a powerful, connected digital footprint. […] Because it’s already the most popular CMS in the world, used by many of the world’s largest sites, and because it’s highly compatible as a headless CMS, bringing flexibility, extensibility, and tons of features that content creators love, WordPress is a natural fit for headless configurations.”

Just a year ago, a Reddit user informally polled people in r/WordPress, and while it’s far from scientific, the results are about as reliable as the conjecture before it:

Headless may very well be the future of WordPress, but the proof has yet to make its way into everyday developer stacks. It could very well be that general interest and curiosity are driving the future more than tangible works, as another of WPEngine’s articles from the same year as the bespoke report suggests when identifying “Headless WordPress” as a hot search term. This could just as well be a lot more smoke than fire.

That’s why I believe that “headless” is not yet a true alternative to a traditional WordPress stack that relies on the WordPress front-end architecture. I see it more as another approach, or flavor, to building websites in general and a niche one at that.

That was all true merely three years ago and is still true today.

WPEngine “Owns” Headless WordPress

It’s no coincidence that we’re referencing WPEngine when discussing headless WordPress because the hosting company is heavily betting on it becoming the de facto approach to WordPress development.

Take, for instance, WPEngine’s launch of Faust.js, a headless framework with WPGraphQL as its foundation. Faust.js is an opinionated framework that allows developers to use WordPress as the back-end content management system and Next.js to render the front-end side of things. Among other features, Faust.js replicates the WordPress template system for Next.js, making the configuration to render posts and pages from WordPress data a lot easier out of the box.

WPEngine is well-suited for this task, as it can offer hosting for both Node.js and WordPress as a single solution via its Atlas platform. WPEngine also bought the popular Advanced Custom Fields (ACF) plugin that helps define relationships among entities in the WordPress data model. Add to that the fact that WPEngine has taken over the Headless WordPress Discord server, with discussions centered around WPGraphQL, Faust, Atlas, and ACF. It could very well be named the WPEngine-Powered Headless WordPress server instead.

But WPEngine’s agenda and dominance in the space is not the point; it’s more that they have a lot of skin in the game as far as anticipating a headless WordPress future. Even more so now than three years ago.

GraphQL API for WordPress → Gato GraphQL

I created a plugin several years ago called GraphQL API for WordPress to help support headless WordPress development. It converts data pulled from the WordPress REST API into structured GraphQL data for more efficient and flexible queries based on the content managed and stored in WordPress.

More recently, I released a significantly updated version of the plugin, so updated that I chose to rename it to Gato GraphQL, and it is now freely available in the WordPress Plugin Directory. It’s a freemium offering like many WordPress plugin pricing models. The free, open-source version in the plugin directory provides the GraphQL server, maps the WordPress data model into the GraphQL schema, and provides several useful features, including custom endpoints and persisted queries. The paid commercial add-on extends the plugin by supporting multiple query executions, automation, and an HTTP client to interact with external services, among other advanced features.

I know this sounds a lot like a product pitch but stick with me because there’s a point to the decision I made to revamp my existing GraphQL plugin and introduce a slew of premium services as features. It fits with my belief that

WordPress is becoming more and more open to giving WordPress developers and site owners a lot more room for innovation to work collaboratively and manage content in new and exciting ways both in and out of WordPress.

JavaScript Frameworks & Headless WordPress

Gatsby was perhaps the most popular and leading JavaScript framework for creating headless WordPress sites at the time my first article was published in 2021. These days, though, Gatsby is in steep decline and its integration with WordPress is no longer maintained.

Next.js was also a leader back then and is still very popular today. The framework includes several starter templates designed specifically for headless WordPress instances.

SvelteKit and Nuxt are surging these days and are considered good choices for establishing headless WordPress, as was discussed during WordCamp Asia 2024.

Today, in 2024, we continue to see new JavaScript framework entrants in the space, notably Astro. Despite Gatsby’s recent troubles, the landscape of using JavaScript frameworks to create front-end experiences from the WordPress back-end is largely the same as it was a few years ago, if maybe a little easier, thanks to the availability of new templates that are integrated right out of the box.

GraphQL Transcends Headless WordPress

The biggest difference between the WPGraphQL and Gato GraphQL plugins is that, where WPGraphQL is designed to convert REST API data into GraphQL data in a single direction, Gato GraphQL uses GraphQL data in both directions in a way that can be used to manage non-headless WordPress sites as well. I say this not as a way to get you to use my plugin but to help describe how GraphQL has evolved to the point where it is useful for more cases than headless WordPress sites.

Managing a WordPress site via GraphQL is possible because GraphQL is an agnostic tool for interacting with data, whatever that interaction may be. GraphQL can fetch data from the server, modify it, store it back on the server, and invoke external services. These interactions can all be coded within a single query.

GraphQL can then be used to regex search and replace a string in all posts, which is practical when doing site migrations. We can also import a post from another WordPress site or even from an RSS feed or CSV source.

And thanks to the likes of WordPress hooks and WP-Cron, executing a GraphQL query can be an automated task. For instance, whenever the publish_post hook is triggered — i.e., a new post on the site is published — we can execute certain actions, like an email notification to the site admin, or generate a featured image with AI if the post lacks one.

In short, GraphQL works both ways and opens up new possibilities for better developer and author experiences!

GraphQL Becomes A “Core” Feature In WordPress 6.5

I have gone on record saying that GraphQL should not be a core part of WordPress. There’s a lot of reasoning behind my opinion, but what it boils down to is that the WP REST API is perfectly capable of satisfying our needs for passing data around, and adding GraphQL to the mix could be a security risk in some conditions.

My concerns aside, GraphQL officially became a first-class citizen of WordPress when it was baked into WordPress 6.5 with the introduction of Plugin Dependencies, a feature that allows plugins to identify other plugins as dependencies. We see this in the form of a new “Requires Plugins” comment in a plugin’s header:

/**
 * Plugin Name: My Ecommerce Payments for Gato GraphQL
 * Requires Plugins: gatographql
 */

WordPress sees which plugins are needed for the current plugin to function properly and installs everything together at the same time, assuming that the dependencies are readily available in the WordPress Plugin Directory.

So, check this out. Since WPGraphQL and Gato GraphQL are in the plugin directory, we can now create another plugin that internally uses GraphQL and distributes it via the plugin directory or, in general, without having to indicate how to install it. For instance, we can now use GraphQL to fetch data to render the plugin’s blocks.

In other words, plugins are now capable of more symbiotic relationships that open even more possibilities! Beyond that, every plugin in the WordPress Plugin Directory is now technically part of WordPress Core, including WPGraphQL and Gato GraphQL. So, yes, GraphQL is now technically a “core” feature that can be leveraged by other developers.

Helping WordPress Lead The CMS Market, Again

While delivering the keynote presentation during WordCamp Asia 2024, Human Made co-founder Noel Tock discussed the future of WordPress. He argues that WordPress growth has stagnated in recent years, thanks to a plethora of modern web services capable of interacting and resulting in composable content management systems tailored to certain developers in a way that WordPress simply isn’t.

Tock continues to explain how WordPress can once again become a growth engine by cleaning up the WordPress plugin ecosystem and providing first-class integrations with external services.

Do you see where I am going with this? GraphQL could play an instrumental role in WordPress’s future success. It very well could be the link between WordPress and all the different services it interacts with, positioning WordPress at the center of the web. The recent Plugin Dependencies feature we noted earlier is a peek at what WordPress could look like as it adopts more composable approaches to content management that support its position as a market leader.

Conclusion

“Headless” WordPress is still “the future” of WordPress. But as we’ve discussed, there’s very little actual movement towards that future as far as developers buying into it despite displaying deep interest in headless architectures, with WordPress purely playing the back-end role.

There are new and solid frameworks that rely on GraphQL for querying data, and those won’t go away anytime soon. And those frameworks are the ones that rely on existing WordPress plugins that consume data from the WordPress REST API and convert it to structured GraphQL data.

Meanwhile, WordPress is making strides toward greater innovation as plugin developers are now able to leverage other plugins as dependencies for their plugins. Every plugin listed in the WordPress Plugin Directory is essentially a feature of WordPress Core, including WPGraphQL and Gato GraphQL. That means GraphQL is readily available for any plugin developer to tap into as of WordPress 6.5.

GraphQL can be used not only for headless but also to manage the WordPress site. Whenever data must be transformed, whether locally or by invoking an external service, GraphQL can be the tool to do it. That even means that data transforms can be triggered automatically to open up new and interesting ways to manage content, both inside and outside of WordPress. It works both ways!

So, yes, even though headless is the future of WordPress (and shall always be), GraphQL could indeed be a key component in making WordPress once again an innovative force that shapes the future of CMS.