Skip to content

fix(core/workflow): handle space/enter interactivity and add proper a11y semantics - #2647

Open
lakshmi-priya-b wants to merge 3 commits into
mainfrom
fix/IX-4340-workflow
Open

fix(core/workflow): handle space/enter interactivity and add proper a11y semantics#2647
lakshmi-priya-b wants to merge 3 commits into
mainfrom
fix/IX-4340-workflow

Conversation

@lakshmi-priya-b

@lakshmi-priya-b lakshmi-priya-b commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

💡 What is the current behavior?

  • Enabling tab is not receiving proper visual focus indicator
  • disabled steps announced as 'clickable circle graphics'
  • add proper a11y semantic roles
  • space and enter key is not activating the step

JIRA : [IX-4340]

🆕 What is the new behavior?

  • focus indicator will have proper visibility
  • handled a11y semantics
  • space and enter key would be used to activate the workflow step

🏁 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

  • Accessibility Improvements

    • Improved keyboard navigation for workflow steps using Enter and Space.
    • Updated focus indicators to align with current theme styling.
    • Improved focus behavior and ARIA attributes for clearer step states.
    • Enhanced tab navigation and support for disabled and current step states.
  • Bug Fixes

    • Ensured keyboard activation updates the selected workflow step consistently.
  • Tests

    • Added accessibility and keyboard interaction coverage for workflow steps.

@netlify

netlify Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit 84fec6a
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a6c4ab287b41c0008bd2056
😎 Deploy Preview https://deploy-preview-2647--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 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Workflow steps now handle Enter and Space selection on the interactive step element, expose updated ARIA and tab semantics, use theme-based focus styling, and include accessibility and keyboard regression tests.

Changes

Workflow step accessibility

Layer / File(s) Summary
Interactive step behavior
packages/core/src/components/workflow-step/workflow-step.tsx, packages/core/src/components/workflow-step/workflow-step.scss
Click and keyboard handlers, dynamic accessibility attributes, and theme-based focus outlines are applied to the interactive step element.
Accessibility and keyboard regression coverage
packages/core/src/components/workflow-steps/test/workflow-steps.ct.ts
Tests verify Axe compliance, ARIA attributes, tab behavior, and selection through Enter and Space.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant InteractiveStep
  participant WorkflowStep
  User->>InteractiveStep: Press Enter or Space
  InteractiveStep->>WorkflowStep: Trigger onKeyDown
  WorkflowStep->>WorkflowStep: Prevent default and call onStepClick
  WorkflowStep-->>InteractiveStep: Apply selected state
Loading

Possibly related PRs

  • siemens/ix#2624: Both changes update keyboard accessibility, focus handling, and ARIA behavior on inner interactive elements.
  • siemens/ix#2665: Both changes add keyboard activation and focus-visible styling for interactive component elements.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: keyboard activation and accessibility semantics for the workflow component.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/IX-4340-workflow

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.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 84fec6a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces accessibility and keyboard navigation improvements to the workflow step components, including ARIA roles, dynamic labels, and support for Space and Enter key selection, backed by new component tests. The review feedback highlights a critical bug in getStepLabel where the aria-label is repeatedly appended with the status on subsequent renders, suggesting a caching mechanism. Additionally, the feedback notes a missing changeset for these user-facing accessibility changes and recommends exposing a customizable prop for the 'Step indicator' label instead of hardcoding it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/core/src/components/workflow-step/workflow-step.tsx Outdated
Comment thread packages/core/src/components/workflow-steps/workflow-steps.tsx
@lakshmi-priya-b
lakshmi-priya-b marked this pull request as ready for review July 13, 2026 11:45

@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: 1

🤖 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/workflow-step/workflow-step.tsx`:
- Around line 188-196: Update the role attribute in the workflow-step render
logic to use JavaScript undefined when this.clickable is false, so the role
attribute is omitted; preserve role="button" for clickable steps and follow the
existing aria-disabled and aria-current pattern.
🪄 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

Run ID: 0fe542b7-9673-455e-8555-49b5685a938c

📥 Commits

Reviewing files that changed from the base of the PR and between 53d4b60 and 3f0bc53.

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

Comment thread packages/core/src/components/workflow-step/workflow-step.tsx
@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 (3)
packages/core/src/components/workflow-step/workflow-step.tsx (3)

188-196: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a changeset for this consumer-visible behavior change.

This PR changes keyboard activation, focusability, and ARIA semantics of ix-workflow-step. These changes are user-facing and consumer-relevant.

Add a changeset for the affected package. If the change is internal-only, document that justification explicitly.

🤖 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/workflow-step/workflow-step.tsx` around lines
188 - 196, Add a changeset for the package containing ix-workflow-step,
documenting the consumer-visible keyboard activation, focusability, and ARIA
semantics changes with the appropriate release impact. Do not classify this as
internal-only unless the changeset explicitly justifies that classification.

Source: Path instructions


188-196: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add Storybook coverage for workflow-step interaction states.

No Storybook story exists for workflow-step. Cover the new focus states, disabled semantics, and keyboard activation.

🤖 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/workflow-step/workflow-step.tsx` around lines
188 - 196, Add Storybook coverage for the workflow-step component, using its
existing story/component conventions. Include stories or controls demonstrating
focused and selected states, disabled semantics, clickable versus non-clickable
behavior, and keyboard activation through the onKeyDown interaction.

Source: Path instructions


141-146: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Return before suppressing activation keys on non-interactive steps.

tabIndex="-1" allows programmatic focus, but onKeyDown() suppresses Space and Enter for disabled or non-clickable steps without selecting them. Return from disabled or !clickable states before calling preventDefault().

Proposed fix
  onKeyDown(event: KeyboardEvent) {
+   if (this.disabled || !this.clickable) {
+     return;
+   }
    if (event.key === ' ' || event.key === 'Enter') {
      event.preventDefault();
      this.onStepClick();
    }
  }
🤖 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/workflow-step/workflow-step.tsx` around lines
141 - 146, Update onKeyDown in the workflow step component to return immediately
when the step is disabled or not clickable, before handling Space or Enter and
calling preventDefault(). Preserve activation behavior for interactive steps.
🤖 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/workflow-step/workflow-step.tsx`:
- Around line 188-196: Add a changeset for the package containing
ix-workflow-step, documenting the consumer-visible keyboard activation,
focusability, and ARIA semantics changes with the appropriate release impact. Do
not classify this as internal-only unless the changeset explicitly justifies
that classification.
- Around line 188-196: Add Storybook coverage for the workflow-step component,
using its existing story/component conventions. Include stories or controls
demonstrating focused and selected states, disabled semantics, clickable versus
non-clickable behavior, and keyboard activation through the onKeyDown
interaction.
- Around line 141-146: Update onKeyDown in the workflow step component to return
immediately when the step is disabled or not clickable, before handling Space or
Enter and calling preventDefault(). Preserve activation behavior for interactive
steps.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8fc14b46-dc63-443c-ba0f-c2699c4b03b6

📥 Commits

Reviewing files that changed from the base of the PR and between 3f0bc53 and 84fec6a.

📒 Files selected for processing (1)
  • packages/core/src/components/workflow-step/workflow-step.tsx

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