Skip to content

feat(core/application): Add skip links to ix-application component - #2670

Open
dmytro-halimov wants to merge 3 commits into
mainfrom
feature/skip-links
Open

feat(core/application): Add skip links to ix-application component#2670
dmytro-halimov wants to merge 3 commits into
mainfrom
feature/skip-links

Conversation

@dmytro-halimov

@dmytro-halimov dmytro-halimov commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Docs PR: siemens/ix-docs#271
Starter: siemens/ix-starter#191

🆕 What is the new behavior?

Add a default-on skip link to ix-application for bypassing repeated application-shell content, including configurable destination targeting with focus and scroll management, localized link text, and an explicit opt-out for applications that provide their own bypass mechanism.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

Summary by CodeRabbit

  • New Features

    • Added a keyboard-accessible “Skip to main content” link to applications by default, with configurable target behavior.
    • Supports localized link text and proper focus/scroll handling, including right-to-left layouts.
    • Provides options to disable the built-in link or override its label/target.
  • Accessibility

    • Improved skip-link semantics in example apps and updated ARIA/accessibility snapshots accordingly.
    • Expanded regression coverage (including axe and visual checks) for skip-link rendering, activation, and edge cases.

@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6b4864c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@siemens/ix Minor
@siemens/ix-angular Minor
@siemens/ix-docs Minor
@siemens/ix-react Minor
@siemens/ix-vue Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit 6b4864c
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a637127cfca6700088bc661
😎 Deploy Preview https://deploy-preview-2670--ix-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

ix-application now provides a default-on, configurable skip link with localization, custom target validation, focus/scroll handling, opt-out support, styling, framework bindings, updated previews, and accessibility, functional, and visual regression coverage.

Changes

Application skip-link support

Layer / File(s) Summary
Skip-link API and behavior
packages/core/src/components/application/*, packages/core/src/components.d.ts, packages/angular/src/components.ts
ix-application exposes skip-link properties, renders the link, validates custom targets, manages focusability and scrolling, supports fallback behavior, and applies themed LTR/RTL focus styles.
Component behavior validation
packages/core/src/components/application/test/*, packages/core/src/components/menu*/test/*
Regression tests cover keyboard order, visibility, focus and scroll behavior, invalid targets, localization, disabling, history preservation, and adjusted menu navigation.
Preview application target wiring
packages/*-test-app/src/preview-examples/*, .changeset/*
Framework preview applications configure main-content as the skip-link target and document the minor release.
Framework and visual regression coverage
testing/framework-tests/*, testing/visual-testing/*
ARIA snapshots and Playwright tests cover skip-link rendering, activation, axe checks, and focused visual appearance.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ix_application
  participant SkipLinkTarget
  participant MainRegion
  User->>ix_application: Focus and activate skip link
  ix_application->>SkipLinkTarget: Resolve and validate configured target
  ix_application->>SkipLinkTarget: Focus and scroll usable target
  ix_application->>MainRegion: Focus internal main region on fallback
Loading

Suggested reviewers: nuke-ellington

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding skip links to the ix-application component.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/skip-links

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dmytro-halimov dmytro-halimov added this to the 5.2.0 milestone Jul 23, 2026
@dmytro-halimov
dmytro-halimov marked this pull request as ready for review July 24, 2026 12:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/components/application/application.scss`:
- Around line 33-36: Remove the empty line between the z-index and padding
declarations in the application styles so padding immediately follows z-index
and satisfies the declaration-empty-line-before lint rule.
- Around line 28-32: Update the multiline calc() expressions in the application
styles, including the inset-inline-start declarations near the referenced
sections, to place each + operator at the beginning of the following line rather
than leaving it at the end of the preceding line. Preserve the existing values
and formatting otherwise so stylelint no longer reports
scss/operator-no-newline-after violations.

In `@packages/core/src/components/application/application.tsx`:
- Around line 213-251: Update focusCustomSkipLinkTarget and
restoreTemporaryTargetFocusability so each temporary target’s blur listener
captures and restores that specific target rather than reading the shared
temporaryFocusTarget at event time. Ensure switching focus from one custom
target to another cleans up the previous target independently, removes only its
own listener and temporary tabindex, and preserves the current target’s cleanup
state.
- Around line 193-211: Update findCustomSkipLinkTarget to query only elements
matching the requested targetId using a properly escaped attribute selector,
while preserving the existing isOwnedLightDomDescendant check, uniqueness
validation, usability validation, warning, and fallback behavior.

In `@packages/core/src/components/application/test/application.ct.ts`:
- Around line 86-89: Update the outlineInset calculation in the link.evaluate
callback to use Number.parseFloat for both style.outlineWidth and
style.outlineOffset, replacing the global parseFloat calls without changing the
calculation.

In `@testing/visual-testing/tests/application/application.e2e.ts`:
- Around line 13-26: Update the focused skip-link regression test to execute for
theme-classic-light, theme-classic-dark, and the brand theme, reusing the
existing navigation, viewport, focus assertions, and screenshot configuration
for each variant.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d62d2310-3d28-499d-8ce3-1e82d6479d08

📥 Commits

Reviewing files that changed from the base of the PR and between 70e1c5c and 6fe8e6e.

⛔ Files ignored due to path filters (5)
  • packages/angular/standalone/src/components.ts is excluded by !packages/angular/standalone/src/components.ts
  • packages/react/src/components/components.server.ts is excluded by !packages/react/src/components/**
  • packages/vue/src/components/ix-application.ts is excluded by !packages/vue/src/components/**
  • testing/visual-testing/__screenshots__/tests/application/application.e2e.ts/focused-skip-link-1-chromium---classic-dark-linux.png is excluded by !**/*.png
  • testing/visual-testing/__screenshots__/tests/application/application.e2e.ts/focused-skip-link-1-chromium---classic-light-linux.png is excluded by !**/*.png
📒 Files selected for processing (27)
  • .changeset/calm-birds-skip.md
  • packages/angular-standalone-test-app/src/preview-examples/application.html
  • packages/angular-test-app/src/preview-examples/application.html
  • packages/angular/src/components.ts
  • packages/core/src/components.d.ts
  • packages/core/src/components/application/application.scss
  • packages/core/src/components/application/application.tsx
  • packages/core/src/components/application/test/application.ct.ts
  • packages/core/src/components/menu-category/test/menu-category.ct.ts
  • packages/core/src/components/menu/test/menu.ct.ts
  • packages/html-test-app/src/preview-examples/application.html
  • packages/react-test-app/src/preview-examples/application.tsx
  • packages/vue-test-app/src/preview-examples/application.vue
  • testing/framework-tests/__snapshots__/about-and-legal-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/application-advanced-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/application-app-switch-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/application-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/application-breakpoints-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/application-header-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/menu-category-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/popover-news-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/settings-aria-snapshot.yaml
  • testing/framework-tests/tests/application-skip-link-axe.spec.ts
  • testing/framework-tests/tests/application-skip-link.spec.ts
  • testing/framework-tests/tests/working-with-axe.spec.ts
  • testing/framework-tests/tests/working.spec.ts
  • testing/visual-testing/tests/application/application.e2e.ts

Comment thread packages/core/src/components/application/application.scss
Comment thread packages/core/src/components/application/application.scss
Comment thread packages/core/src/components/application/application.tsx
Comment thread packages/core/src/components/application/application.tsx
Comment thread packages/core/src/components/application/test/application.ct.ts
Comment thread testing/visual-testing/tests/application/application.e2e.ts
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/components/application/application.tsx (1)

92-95: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the correct @since version for these new ix-application props.

@siemens/ix is currently 5.1.1, and the changeset for this skip-link API is a minor change, so the new disableSkipLink, i18nSkipToContent, and skipLinkTargetId props should use the next released minor version, not 5.2.0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/components/application/application.tsx` around lines 92 -
95, Update the JSDoc `@since` annotations for the new ix-application props
disableSkipLink, i18nSkipToContent, and skipLinkTargetId to use the next
released minor version based on the current 5.1.1 package version and minor
changeset, replacing 5.2.0 with the correct version consistently.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/core/src/components/application/application.tsx`:
- Around line 92-95: Update the JSDoc `@since` annotations for the new
ix-application props disableSkipLink, i18nSkipToContent, and skipLinkTargetId to
use the next released minor version based on the current 5.1.1 package version
and minor changeset, replacing 5.2.0 with the correct version consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 93fcd3c4-5a7c-49cf-9753-7695732d4bce

📥 Commits

Reviewing files that changed from the base of the PR and between 6fe8e6e and 6b4864c.

📒 Files selected for processing (3)
  • packages/core/src/components/application/application.scss
  • packages/core/src/components/application/application.tsx
  • packages/core/src/components/application/test/application.ct.ts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant