Skip to content

feat(#1553): add 401, 404, 500 error page examples#3853

Merged
ArakTaiRoth merged 2 commits intodevfrom
tom/error-page-examples
Apr 28, 2026
Merged

feat(#1553): add 401, 404, 500 error page examples#3853
ArakTaiRoth merged 2 commits intodevfrom
tom/error-page-examples

Conversation

@twjeffery
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery commented Apr 21, 2026

Summary

  • Adds three error page examples (401 Restricted access, 404 Page not found, 500 Server problem) under docs/src/content/examples/. Each covers React, Angular, and Web Components.
  • Examples composed from goa components (GoabPageBlock, GoabBlock, GoabIcon, GoabText, GoabButton, GoabLink). A small amount of class-based CSS covers the icon-in-circle, brand accent bar, centred text, and the icon scaled beyond xlarge.
  • Also exposes role on the React and Angular icon wrappers (feat(#3871), issue Expose role prop on React and Angular icon wrappers #3871) so decorative icons can use role="presentation". Came up during review.
  • Closes "Error" page templates #1553.

Custom things that could be components (maybe)

The examples surfaced a few gaps thinking about if we would ever want components for:

  1. Icon sizes above xlarge (2.5rem cap) for page-scale illustrations.
  2. A primitive for the icon-in-circle emphasis treatment used here and in empty, onboarding, and status screens.
  3. A textAlign prop on GoabText for centred layouts where body copy wraps.

Test plan

  • /examples/404-error-page, /examples/401-error-page, /examples/500-error-page render with the correct visual treatment.
  • All three code tabs (React, Angular, Web Components) render cleanly with no truncation.
  • Resize across mobile, tablet, and desktop; horizontal padding shifts 16, 32, 64 via GoabPageBlock.
  • Keyboard: can reach the "Go to home page" button and, on 401, the support email link.
  • Accessibility section below each preview surfaces the accessibilityNotes.
image image image

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for benji-docs-previews ready!

Name Link
🔨 Latest commit 07f8fae
🔍 Latest deploy log https://app.netlify.com/projects/benji-docs-previews/deploys/69e7e65855f9930008a29db7
😎 Deploy Preview https://deploy-preview-3853--benji-docs-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@twjeffery twjeffery marked this pull request as ready for review April 21, 2026 21:14
Comment thread docs/src/content/examples/401-error-page/web-components.html Outdated
Comment thread docs/src/content/examples/401-error-page/web-components.html Outdated
Comment thread docs/src/content/examples/404-error-page/angular.html Outdated
Comment thread docs/src/content/examples/404-error-page/angular.ts Outdated
Comment thread docs/src/content/examples/404-error-page/react.tsx Outdated
Comment thread docs/src/content/examples/404-error-page/web-components.html Outdated
Comment thread docs/src/content/examples/500-error-page/angular.ts Outdated
Comment thread docs/src/content/examples/500-error-page/react.tsx Outdated
Comment thread docs/src/content/examples/500-error-page/web-components.html Outdated
@twjeffery twjeffery force-pushed the tom/error-page-examples branch from 07f8fae to f3b015b Compare April 23, 2026 19:15
@twjeffery twjeffery linked an issue Apr 23, 2026 that may be closed by this pull request
@twjeffery
Copy link
Copy Markdown
Collaborator Author

Thanks @vanessatran-ddi. All comments addressed:

  1. Removed version from <goa-icon> in the web component examples.
  2. role="presentation" on the icon and removed aria-hidden from the wrapper div, on every page across all three frameworks.
  3. 0.5rem on the underline is now var(--goa-space-xs).

Two things:

  • GoabIcon and goab-icon didn't expose role, so I added that in a separate commit (feat(#3871)) and filed Expose role prop on React and Angular icon wrappers #3871 to track.
  • Kept aria-hidden="true" on the decorative underline <div> since it's just a plain div and there isn't really a role to set there. Happy to change if you'd prefer.

Copy link
Copy Markdown
Collaborator

@vanessatran-ddi vanessatran-ddi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Copy Markdown
Collaborator

@willcodeforcoffee willcodeforcoffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks a lot, Tom.

Comment thread docs/src/content/examples/401-error-page/index.mdx
@ArakTaiRoth ArakTaiRoth merged commit a5ac8e1 into dev Apr 28, 2026
4 of 5 checks passed
@ArakTaiRoth ArakTaiRoth deleted the tom/error-page-examples branch April 28, 2026 18:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-28 18:52 UTC

@github-actions
Copy link
Copy Markdown

Preview removed

All preview folders cleaned from gh-pages branch.

@chrisolsen
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 7.0.0-dev.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@chrisolsen
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 5.0.0-dev.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@chrisolsen
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0-dev.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

@chrisolsen
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0-dev.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose role prop on React and Angular icon wrappers "Error" page templates

5 participants