Inline Form Errors - What They Are and Why they Matter



December 05, 2016

This article was initially posted as a guest blog on The Digital Echidna Blog on December 2, 2016.

Image flow chartLots of organizations are working hard to see that their IT is accessible to their visitors and staff. Reducing barriers for effective two-way communications is really important for businesses that want to engage fully with their community. Unfortunately, many organizations overlook the many challenges with online web forms.

Organizations who adopted Drupal 7 benefit from having semantic labels associated with their web forms automatically. This is a particular problem with custom built web-forms, but the Drupal community made an effort towards solid accessibility defaults and continues to do so.

Drupal 8 takes web forms further, adding WAI-ARIA to provide additional semantic markup around descriptive text. Drupal 8 is the first CMS to embrace the HTML5 details/summary elements. These elements allows Drupal 8 forms to use fieldsets for what they are intended and avoids the problem of nested fieldsets, which were inevitable in earlier versions of Drupal.

Adding other HTML5 tags to Drupal Core helps build more semantic sites. Users are encouraged to use tags with meaning which help screen-reader users as well as search engines.

Animated gif before the patch.
Default Drupal 8 errors. Animation by Daniel Smidt

The Accessibility Team wasn’t satisfied with this and realized that we needed to address Guideline 3.3 of WCAG 2.0 AA, which states that all users need to:

  • Be aware that an error has occurred and understand what is wrong
  • Be given suggestions for correction of an input error if it is possible
  • Be provided with safeguards to avoid serious consequences resulting from mistakes
  • Have their input checked for errors and be provided an opportunity to correct them.

These really don’t sound that difficult, but unfortunately they are. Brandon Bowersox-Johnson spearheaded this back in 2012 outlining what needed to happen.

This required many changes to Drupal’s Form API, which is used on almost every Drupal admin page and with all of its web forms. An issue to address this was started later that year in the Drupal issue queue and Inline form errors for accessibility and UX resulted in over 600 comments over four years.

It also got into Drupal Core, although not for very long. It became clear that there were a number of regressions which were major enough that Drupal 8 could not be released without their being fixed. Rather than continue to hold up the release, the community decided to roll this back into an Experimental Core module.

This was absolutely the right call for 8.0. More attention has gone into the many sub-issues and several of them have been fixed. Drupal Core needs to be stable and predictable. Several developers have been very active in trying to fix these issues. In no particular order I’d like to highlight just some of the folks who have contributed to addressing these issues: Pieter Frenssen, Tim Plunkett, Baris Wanschers, Daniël Smidt, and Scott Carpenter.

Animated gif after the the expirimental Module is defined.
Drupal 8 with the Optional Inline Form Errors module enabled. Animation by Daniel Smidt

There has been a lot of effort from some really smart folks going into this very important issue. Unfortunately it isn’t enough. Inline Form Errors need to be enabled by default. Everyone benefits from this better UI. Right now only a small fraction of Drupal 8 sites have enabled this module, because it is an optional Experimental Module and there are serious warnings included with it.

This module is also slated to be removed from Core and brought in as a regular Contrib module. There are good reasons to do this, but it makes it less likely that this improved pattern will ever get into Core.

This is not a trivial request, but it is an important one. For all agencies who are legally required to meet WCAG 2.0 AA, this is an area where your site likely fails. Although there are workarounds that can be done for individual sites and specific modules, we really need a centralized solution for this.

Please consider investing time or money in addressing this outstanding Drupal 8 meta issue and seeing that Drupal remains a leader in this space.

About The Author

Mike Gifford is the founder of OpenConcept Consulting Inc, which he started in 1999. Since then, he has been particularly active in developing and extending open source content management systems to allow people to get closer to their content. Before starting OpenConcept, Mike had worked for a number of national NGOs including Oxfam Canada and Friends of the Earth.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.