Skip to content

web/a11y: Modals, Command Palette (Merge branch)#17812

Merged
GirlBossRush merged 63 commits intomainfrom
fix-wizard-typing
Mar 25, 2026
Merged

web/a11y: Modals, Command Palette (Merge branch)#17812
GirlBossRush merged 63 commits intomainfrom
fix-wizard-typing

Conversation

@GirlBossRush
Copy link
Contributor

@GirlBossRush GirlBossRush commented Oct 30, 2025

This PR is a merge branch for <ak-modal>, a custom element built on the native <dialog> element, with support for lazy-loading and screen-reader compatibility.

Given our heavy use of modals in the UI, the new component is fully backwards compatible with existing implementations. To illustrate the migration path, this PR applies <ak-modal> to a few examples: About authentik, Create Application, and Edit Application.

  • About authentik extends the base modal class with an updated template. The modal is added to the DOM only when the button is clicked and removed when closed — ideal for infrequently used or content-heavy modals.
  • Create Application uses a renderModal utility function to trigger a modal from an event listener, with the same lazy-loading behaviour.
  • Edit Application is similar, but also demonstrates passing data to the modal without a bound event listener per table row.

Details

Introduces <ak-modal>, a new custom element built on the native <dialog> element, with support for lazy-loading, screen-reader accessibility (delegatesFocus, proper ARIA labeling), and a renderModal / modalInvoker utility API for programmatic and declarative usage.

  • Migrates modals across the admin UI to use <ak-modal>, replacing the legacy TableModal and ModalButton-based patterns. Affected areas include: application create/edit, user management (password reset, impersonation, bulk revoke, activate/deactivate), group/role member selection, provider selection, permission selection, RAC launch endpoint, policy bindings, About authentik, and more.
  • Removes deprecated components: TableModal, ProviderSelectModal, PermissionSelectModal, GroupSelectModal, and the old Modal/modal.css styles. Replaces them with leaner form-based equivalents (ProviderSelectForm, PermissionSelectForm, UserGroupSelectForm, MemberSelectForm).
  • Extracts form serialization into a dedicated serialization.ts module and validation error reporting into errors.ts, simplifying Form.ts.
  • Adds a new command palette (<ak-command-palette>) with admin and user variants, including keyboard navigation and search.
  • Refactors the wizard component (WizardStep.ts, ak-wizard-steps.ts) and the application wizard to align with the new modal system, cleaning up step types and provider form composition.
  • Moves several utility files to more appropriate locations (policies/utils.ts, sources/utils.ts, events/ObjectChangelog.ts, events/UserEvents.ts into admin/ or common/).

Migration highlights

Pattern Before After
Infrequent modals (e.g. About) Always in DOM Lazy — added on open, removed on close
Table row actions (e.g. Edit Application) TableModal subclass with embedded table renderModal() / modalInvoker directive with a plain form
Selection modals (e.g. Group/Provider/Permission select) *SelectModal extending TableModal *SelectForm rendered inside <ak-modal>
Programmatic open Manual orchestration controller renderModal(MyForm, init) returns a Promise<void>

Misc changes

  • TableModal is removed — any downstream subclasses must migrate to <ak-modal> + form pattern.
  • AkControlElement renamed to ControlElement.
  • Several internal module paths changed (see file renames above).

@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Oct 30, 2025
@GirlBossRush GirlBossRush requested a review from a team as a code owner October 30, 2025 01:27
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 6176aef
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69c3512d0671af000814d7da
😎 Deploy Preview https://deploy-preview-17812--authentik-docs.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.

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 6176aef
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69c3512d49544400080ef6b2
😎 Deploy Preview https://deploy-preview-17812--authentik-integrations.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.

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 56195d2
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69c37474d000b40008d845d3
😎 Deploy Preview https://deploy-preview-17812--authentik-storybook.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.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.82%. Comparing base (5ff8400) to head (56195d2).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17812   +/-   ##
=======================================
  Coverage   92.81%   92.82%           
=======================================
  Files        1000     1000           
  Lines       56589    56589           
  Branches      425      425           
=======================================
+ Hits        52525    52526    +1     
+ Misses       4064     4063    -1     
Flag Coverage Δ
conformance 37.39% <ø> (+<0.01%) ⬆️
e2e 42.89% <ø> (-0.01%) ⬇️
integration 22.22% <ø> (+<0.01%) ⬆️
rust 0.23% <ø> (ø)
unit 91.72% <ø> (+<0.01%) ⬆️
unit-migrate 91.81% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-170904cf1ac2e4e623283b2160b4512bf867caf5
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-170904cf1ac2e4e623283b2160b4512bf867caf5

Afterwards, run the upgrade commands from the latest release notes.

Copy link
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

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

Overall, this looks good, and I've run it to see that it doesn't seem broken. :-)

@github-project-automation github-project-automation bot moved this from Todo to In Progress in authentik Core Nov 3, 2025
@GirlBossRush GirlBossRush force-pushed the fix-wizard-typing branch 3 times, most recently from b604703 to 978e587 Compare March 19, 2026 14:50
@GirlBossRush GirlBossRush requested a review from a team as a code owner March 20, 2026 16:01
@GirlBossRush GirlBossRush force-pushed the fix-wizard-typing branch 3 times, most recently from 739e34a to 95aa93b Compare March 24, 2026 02:19
@GirlBossRush GirlBossRush changed the title web: Clarify Application Wizard types. web/a11y: Modals, Command Palette (Merge branch) Mar 24, 2026
@GirlBossRush GirlBossRush enabled auto-merge (squash) March 25, 2026 05:37
@GirlBossRush GirlBossRush removed the request for review from a team March 25, 2026 05:37
@GirlBossRush GirlBossRush merged commit b88d082 into main Mar 25, 2026
107 checks passed
@GirlBossRush GirlBossRush deleted the fix-wizard-typing branch March 25, 2026 06:07
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Mar 25, 2026
This was referenced Mar 25, 2026
kensternberg-authentik added a commit that referenced this pull request Mar 25, 2026
* main: (42 commits)
  endpoints/connectors: fix enabled flag not respected (#21144)
  web: bump vite from 7.3.1 to 8.0.2 in /web (#21109)
  website/docs: add a single page about our user interface, document Consent stage (#20533)
  website: bump the build group across 1 directory with 9 updates (#21127)
  web: bump knip from 5.88.1 to 6.0.5 in /web (#21129)
  core: bump drf-spectacular from 0.28.0 to 0.29.0 (#19420)
  packages/client-go: init (#21139)
  providers/proxy: Add a default maxResponseBodySize to Traefik Middleware (#21111)
  core: bump library/nginx from `dec7a90` to `7150b3a` in /website (#21137)
  core: bump gunicorn from 25.1.0 to 25.2.0 (#21134)
  core: bump github.com/getsentry/sentry-go from 0.43.0 to 0.44.1 (#21122)
  core: bump astral-sh/uv from 0.11.0 to 0.11.1 in /lifecycle/container (#21135)
  ci: bump taiki-e/install-action from 2.69.8 to 2.69.9 in /.github/actions/setup (#21136)
  web/a11y: Modals, Command Palette (Merge branch) (#17812)
  website/docs: document file picker values (#20994)
  packages/client-rust: init (#21117)
  core: bump sentry-sdk from 2.55.0 to 2.56.0 (#21124)
  events: add helper to log deprecation configuration_warning message (#21115)
  core: bump djangorestframework from 3.17.0 to 3.17.1 (#21126)
  core: bump twilio from 9.10.3 to 9.10.4 (#21123)
  ...
kensternberg-authentik added a commit that referenced this pull request Mar 25, 2026
* main: (42 commits)
  endpoints/connectors: fix enabled flag not respected (#21144)
  web: bump vite from 7.3.1 to 8.0.2 in /web (#21109)
  website/docs: add a single page about our user interface, document Consent stage (#20533)
  website: bump the build group across 1 directory with 9 updates (#21127)
  web: bump knip from 5.88.1 to 6.0.5 in /web (#21129)
  core: bump drf-spectacular from 0.28.0 to 0.29.0 (#19420)
  packages/client-go: init (#21139)
  providers/proxy: Add a default maxResponseBodySize to Traefik Middleware (#21111)
  core: bump library/nginx from `dec7a90` to `7150b3a` in /website (#21137)
  core: bump gunicorn from 25.1.0 to 25.2.0 (#21134)
  core: bump github.com/getsentry/sentry-go from 0.43.0 to 0.44.1 (#21122)
  core: bump astral-sh/uv from 0.11.0 to 0.11.1 in /lifecycle/container (#21135)
  ci: bump taiki-e/install-action from 2.69.8 to 2.69.9 in /.github/actions/setup (#21136)
  web/a11y: Modals, Command Palette (Merge branch) (#17812)
  website/docs: document file picker values (#20994)
  packages/client-rust: init (#21117)
  core: bump sentry-sdk from 2.55.0 to 2.56.0 (#21124)
  events: add helper to log deprecation configuration_warning message (#21115)
  core: bump djangorestframework from 3.17.0 to 3.17.1 (#21126)
  core: bump twilio from 9.10.3 to 9.10.4 (#21123)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants