Get the newsletter

Sent straight to your inbox.

Code is digital experience (and law)

The text inside a rounded corner box

Great source code meets machine-readable web industry standards and best practices and – perhaps most important to some – adheres to the code of law.

Estimated read time: 2 minutes

By Luke Fretwell · June 12, 2024

Without code, there is no government digital experience.

Whether it’s good or bad is always up for developer debate, but there are core lines of extensible, machine-readable code that impact how people find and engage a digital service – from search, social media, screen readers to AI and beyond.

A federal agency administrator famously once said to “make the damn websites work,” yet many simple but important lines of code still don’t.

Scanning government websites

Under the Civic Hacking Agency moniker, my son Elias and I built ScanGov, a tool that monitors government websites. It grades and scores based on indicators cited in federal policy, like metadata, URL structure, sitemap and robots.

ScanGov is similar to the General Services Administration federal website scanning service that reviews code elements it deems important and publishes the resulting data. The Cybersecurity and Infrastructure Security Agency does this for .gov privacy and security policy adherence.

ScanGov is different in that it adds a visual layer to make conformance status more accessible. We take a human-centered approach to understanding the results.

Report card

What ScanGov found for federal websites:

  • Overall (Grade: F / Score: 52%)
  • Metadata (Grade: F / Score: 50%)
  • URL (Grade: B / Score: 82%)
  • Sitemap (Grade: F / Score: 33%)
  • Robots (Grade: F / Score: 25%)

Why code matters

Digital experience is often the public’s first point of contact with government.

These lines of code may be trivial to those unfamiliar with granular web technologies, or who see customer experience as just a human-centered design process and front-end aesthetic.

But behind the front door, code is core to all things digital.

Treating code secondary adds up. Minor, unseen experiences with poor code cause muddled experiences. Design systems and processes alone fall victim to user confidence and trust.

Great code supercharges customer experience.

What law says

The 21st Century Integrated Digital Experience Act says federal websites must “ensure interoperability between executive agencies, compliance with industry standards, and adherence to best practices for design, accessibility, and information security.”

The supplemental Office of Management and Budget memo, Delivering a Digital-First Public Experience (M-23-22), says:

“Agencies’ websites must be structured well; contain rich, descriptive metadata; feature machine-readable content to the extent practicable; and follow search engine optimization (SEO) practices to ensure that members of the public can access government information and services from third-party websites and applications. In addition to SEO and public discoverability, a well-structured website also can be friendlier to assistive technology, archival software or services, and for other uses.”

Great source code meets machine-readable web industry standards and best practices and – perhaps most important to some – adheres to the code of law.

Code standards

Some federal web standards established by policy are specifically designated, like the U.S. Web Design System and HTTPS-only. These are important, but we need explicit technical guidance that further helps agencies build better digital experiences, such as standards around, structured markup, content security policy, to name a few.

Because agencies have yet to effectively implement technical elements of M-23-22, the federal government digital community should be more disciplined in getting this done.

There’s wide adoption of the aesthetic elements of the digital experience. The conditions that successfully implemented USWDS should now be applied to code.

Code commit

Everyone on digital service teams – product owners, content designers, developers, even senior technical executives – is responsible for ensuring these lines of code meet high standards.

But, as the Digital Services Playbook says, “Assign one leader and hold that person accountable.

How the federal government takes code commitment seriously:

  • Fully and publicly inventory all federal web assets.
  • Regularly publish site scanning data.
  • Provide specific technical guidance on machine-readable code.
  • Develop documentation on what this code is, and why it’s important.
  • Assign an agency executive to lead conformance (and hold them accountable).

Granular web technology is core to digital government.

Lines of code are invisible to the average person, but the customer experience they create is not.

Photo of Luke Fretwell

Luke Fretwell

Luke Fretwell is the founder and maintainer of GovFresh. More from Luke.

Connect with Luke