Skip to content

web/a11y: User library -- fix issues surrounding element focus, ARIA labeling. - #17522

Merged
GirlBossRush merged 13 commits into
mainfrom
a11y-user-library-focus-targets
Oct 29, 2025
Merged

GirlBossRush merged 13 commits into
mainfrom
a11y-user-library-focus-targets

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Oct 17, 2025 •

Copy link
Copy Markdown
Contributor

Details

This PR fixes several issues which prevented consistent element focusing in the user library such as...

  • When the search input renders for the first time with a prefilled value
  • When accepting an autocomplete suggestion while only one card is available
  • When a focus target is a button, such as a RAC modal
  • When using a keyboard to tab through elements outside of the search input's focus

Additionally, a few ARIA issues have been fixed which prevented search results from consistently communicating the number of cards, which order they render when in column format, and which card is in focus in each group. This is achieved by porting some of the library elements into function components, removing the shadow root boundaries which prevent a direct association of search input to card group.

The visual layout is the same, however card groups now use our fieldset elements which support high-contrast mode:

Normal contrast

No extra padding or margin:

Screenshot 2025-10-17 at 06 48 21

More contrast

Group labels moved inward, matching our design in other fieldsets with visible legends, as well as <ak-form-group /> in high-contrast mode.

Screenshot 2025-10-17 at 06 47 44

@GirlBossRush
GirlBossRush requested a review from BeryJu October 17, 2025 04:59
@GirlBossRush GirlBossRush self-assigned this Oct 17, 2025
@GirlBossRush
GirlBossRush requested a review from a team as a code owner October 17, 2025 04:59
@GirlBossRush GirlBossRush added a11y Features or issues related to accessibility area:frontend Features or issues related to the browser, TypeScript, Node.js, etc labels Oct 17, 2025
@netlify

netlify Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 547e891
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69023c08b5d32200087f8c06

@netlify

netlify Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit 547e891
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69023c08b0d5960008db8370

@netlify

netlify Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 547e891
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69023c085860ba0008b0e450
😎 Deploy Preview https://deploy-preview-17522--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.

@@ -0,0 +1,96 @@
import type { AppGroupEntry } from "./types.js";

@GirlBossRush GirlBossRush Oct 17, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is largely ported from ak-application-list as function component, making a lot of the focus logic possible when connecting search inputs to their respective cards.

Comment on lines +264 to +267
public static shadowRootOptions = { ...AKElement.shadowRootOptions, delegatesFocus: true };

public override tabIndex = -1;

@GirlBossRush GirlBossRush Oct 17, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied so that document.activeElement targets deeper into the <ak-library-impl>

@codecov

codecov Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.98%. Comparing base (c4af2ee) to head (547e891).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17522      +/-   ##
==========================================
+ Coverage   92.93%   92.98%   +0.05%     
==========================================
  Files         869      869              
  Lines       47952    47952              
==========================================
+ Hits        44566    44590      +24     
+ Misses       3386     3362      -24     
Flag Coverage Δ
e2e 45.26% <ø> (+0.05%) ⬆️
integration 23.19% <ø> (+<0.01%) ⬆️
unit 91.08% <ø> (+<0.01%) ⬆️
unit-migrate 91.13% <ø> (+<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.

@GirlBossRush
GirlBossRush force-pushed the a11y-user-library-focus-targets branch 3 times, most recently from acdc2c5 to e5e7808 Compare October 24, 2025 16:55
@GirlBossRush
GirlBossRush force-pushed the a11y-user-library-focus-targets branch from e5e7808 to c95d6a0 Compare October 27, 2025 16:23

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one looks good.

@GirlBossRush
GirlBossRush force-pushed the a11y-user-library-focus-targets branch from c95d6a0 to ad3b44e Compare October 28, 2025 05:23
@GirlBossRush
GirlBossRush enabled auto-merge (squash) October 28, 2025 05:32
@GirlBossRush
GirlBossRush disabled auto-merge October 28, 2025 14:27
@GirlBossRush
GirlBossRush force-pushed the a11y-user-library-focus-targets branch from 1dd33ad to 7a8d51f Compare October 29, 2025 02:48
@GirlBossRush
GirlBossRush force-pushed the a11y-user-library-focus-targets branch from 0d90be0 to f520e37 Compare October 29, 2025 15:55
@github-actions

github-actions Bot commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

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-1359fba7c2f579d0578faa8bb1e170b3ae586749
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-1359fba7c2f579d0578faa8bb1e170b3ae586749

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

@GirlBossRush
GirlBossRush merged commit 42b96e8 into main Oct 29, 2025
@GirlBossRush
GirlBossRush deleted the a11y-user-library-focus-targets branch October 29, 2025 17:59
authentik-automation Bot pushed a commit that referenced this pull request Oct 30, 2025
…labeling. (#17522)

* web/a11y: Fix issues surrounding element focus, aria labeling.

* web: Fix focus

* web: Fix nested focus

* web: Fix menu visibility when anchor positioning is not supported.

* web: Fix icon fallback behavior, labels.

* web: Fix flickering, descriptions.

* web: Fix excess width on mobile.

* web: Fix rendering artifacts on mobile.

* web: Remove aria-controls behavior.

- This is buggy, similar to aria-owns, and may cause crashes.

* web: Fix tabpanel focus attempting to scroll page.

* web: Fix issues surrounding consistent tab panel parameter testing.

* web: add shared helpers.

* web: Tidy comments.
@authentik-automation

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2025.10 created: #17828

BeryJu pushed a commit that referenced this pull request Nov 1, 2025
…labeling. (cherry-pick #17522 to version-2025.10) (#17828)

web/a11y: User library -- fix issues surrounding element focus, ARIA labeling. (#17522)

* web/a11y: Fix issues surrounding element focus, aria labeling.

* web: Fix focus

* web: Fix nested focus

* web: Fix menu visibility when anchor positioning is not supported.

* web: Fix icon fallback behavior, labels.

* web: Fix flickering, descriptions.

* web: Fix excess width on mobile.

* web: Fix rendering artifacts on mobile.

* web: Remove aria-controls behavior.

- This is buggy, similar to aria-owns, and may cause crashes.

* web: Fix tabpanel focus attempting to scroll page.

* web: Fix issues surrounding consistent tab panel parameter testing.

* web: add shared helpers.

* web: Tidy comments.

Co-authored-by: Teffen Ellis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants