Skip to content

fix(core/dropdown-button): accessibility consistency in dropdown-button - #2585

Closed
GayatriK2002 wants to merge 6 commits into
siemens:mainfrom
GayatriK2002:fix-4336/dropdown-accessibility-update
Closed

fix(core/dropdown-button): accessibility consistency in dropdown-button#2585
GayatriK2002 wants to merge 6 commits into
siemens:mainfrom
GayatriK2002:fix-4336/dropdown-accessibility-update

Conversation

@GayatriK2002

@GayatriK2002 GayatriK2002 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

💡 What is the current behavior?

  • EMPTY_PROP = Symbol() causes ARIA attributes to render as "Symbol()" literal in Vue framework; Vue wrapper bypasses ARIA props, screen reader reads "symbol" instead of actual labels
  • dropdown-button-icon preview examples in vue didn't have space/enter interactivity
  • dropdown-button-icon preview examples were taking extra width while focusing on them with tab button

GitHub Issue Number: #
Jira Issue Number: 4336

🆕 What is the new behavior?

  • Updated Vue wrapper with patch (EMPTY_PROP = {}); updated condition in utils.ts ensures ARIA properties always pass through via (key.startsWith(ARIA_PROP_PREFIX) && value !== EMPTY_PROP), fixing "Symbol()" rendering.
  • dropdown-button-icon preview examples in vue now have space/enter interactivity
  • dropdown-button-icon preview examples now gets highlighted properly with css changes in preview example
  • ES2017 target required Babel's _typeof helper when transpiling Symbol(), which was unnecessary overhead so updated them to ES2020, but the TypeScript target updates are a "nice-to-have" optimization, not a requirement for the fix to work

🏁 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

  • Bug Fixes

    • Corrected dropdown button content alignment (cross-axis) across framework preview implementations.
    • Improved Vue component wrapper behavior for forwarding ARIA-related props.
  • Chores

    • Updated TypeScript compiler targets/libs to ES2020 across the main packages and visual testing.
    • Enabled installation-time patching to keep patched dependencies applied consistently.

@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook canceled.

Name Link
🔨 Latest commit c0e7d35
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a54737c321e220007914ccd

@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c0e7d35

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 updates the Vue preview examples for the dropdown button components (dropdown-button-icon.vue and dropdown-button.vue) to import IxDropdownItem alongside IxDropdownButton from @siemens/ix-vue. There are no review comments to address, and I have no additional feedback to provide.

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.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates Vue prop handling and Stencil runtime patches, adds dropdown preview alignment and Vue imports, and changes selected TypeScript configurations from ES2017 to ES2020.

Changes

Vue Sentinel and Patch Workflow

Layer / File(s) Summary
EMPTY_PROP and ARIA forwarding
packages/vue/src/vue-component-lib/utils.ts
Changes the EMPTY_PROP sentinel to {} and forwards non-empty aria* props.
Stencil Vue runtime patch
patches/@stencil__vue-output-target.patch
Changes EMPTY_PROP to {} in the CommonJS and ESM runtime bundles.
Install lifecycle patching
package.json
Runs patch-package during prepare and postinstall, adding the required development dependencies.

Dropdown Preview Fixes

Layer / File(s) Summary
Dropdown button alignment
packages/angular-standalone-test-app/..., packages/angular-test-app/..., packages/html-test-app/..., packages/react-test-app/..., packages/vue-test-app/...
Adds align-items: flex-start to dropdown button preview styles.
Vue dropdown imports
packages/vue-test-app/src/preview-examples/dropdown-button-icon.vue, packages/vue-test-app/src/preview-examples/dropdown-button.vue
Adds IxDropdownItem to both Vue component imports.

ES2020 TypeScript Configuration

Layer / File(s) Summary
TypeScript target and library upgrades
packages/angular/tsconfig.json, packages/vue/tsconfig.json, packages/nextjs-test-app/tsconfig.json, testing/visual-testing/tsconfig.test.json
Changes applicable TypeScript target and lib settings from ES2017 to ES2020.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: danielleroux, nuke-ellington

🚥 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 accurately reflects the main change: dropdown-button accessibility and consistency improvements.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@GayatriK2002
GayatriK2002 marked this pull request as ready for review June 18, 2026 05:07

@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

Caution

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

⚠️ Outside diff range comments (1)
patches/@stencil__vue-output-target.patch (1)

1-29: ⚠️ Potential issue | 🟡 Minor

Add documentation for the @stencil/vue-output-target patch to patches/README.md.

Following the existing pattern for the @stencil/core patch, document this patch by adding:

  • The upstream issue being worked around (related to Vue <3.1.0 compatibility with Symbol())
  • The version of @stencil/vue-output-target this targets (^0.13.2)
  • When/if an upstream fix is available to remove this patch

This will help future maintainers understand when the patch can be safely removed.

🤖 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 `@patches/`@stencil__vue-output-target.patch around lines 1 - 29, Add
documentation for the `@stencil/vue-output-target` patch to the patches/README.md
file following the existing pattern used for the `@stencil/core` patch entry.
Include the upstream issue being addressed (Vue <3.1.0 compatibility issue with
Symbol()), specify the version of `@stencil/vue-output-target` being patched
(^0.13.2), and add a note about when this patch can be safely removed once an
upstream fix is available. This will ensure future maintainers understand the
purpose of the EMPTY_PROP modification from Symbol() to {} and can track when
the patch is no longer needed.
🤖 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/angular/tsconfig.json`:
- Line 19: The `lib` configuration on line 19 is set to ["dom", "es2020"] while
the `target` configuration on line 32 is set to "es2015", creating a mismatch
where ES2020 APIs are permitted during type-checking but the code is only
transpiled to ES2015. Either update both `lib` and `target` to consistently use
"es2020" since the Angular 20.0.0+ peer dependency requires ES2020+ runtime
support, or if keeping the current transpilation target, update the `lib` to
["dom", "es2015"] and add explicit documentation in a README or contributing
guide clearly stating that the library requires an ES2020+ runtime environment
due to its Angular 20.0.0+ peer dependency.

---

Outside diff comments:
In `@patches/`@stencil__vue-output-target.patch:
- Around line 1-29: Add documentation for the `@stencil/vue-output-target` patch
to the patches/README.md file following the existing pattern used for the
`@stencil/core` patch entry. Include the upstream issue being addressed (Vue
<3.1.0 compatibility issue with Symbol()), specify the version of
`@stencil/vue-output-target` being patched (^0.13.2), and add a note about when
this patch can be safely removed once an upstream fix is available. This will
ensure future maintainers understand the purpose of the EMPTY_PROP modification
from Symbol() to {} and can track when the patch is no longer needed.
🪄 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: f4064c63-0c15-44d6-b1c9-fa8f3396f1a2

📥 Commits

Reviewing files that changed from the base of the PR and between 7c34939 and aa779c4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • package.json
  • packages/angular-standalone-test-app/src/preview-examples/dropdown-button-icon.css
  • packages/angular-test-app/src/preview-examples/dropdown-button-icon.css
  • packages/angular/tsconfig.json
  • packages/html-test-app/src/preview-examples/dropdown-button-icon.css
  • packages/nextjs-test-app/tsconfig.json
  • packages/react-test-app/src/preview-examples/dropdown-button-icon.scoped.css
  • packages/vue-test-app/src/preview-examples/dropdown-button-icon.css
  • packages/vue-test-app/src/preview-examples/dropdown-button-icon.vue
  • packages/vue-test-app/src/preview-examples/dropdown-button.vue
  • packages/vue/src/vue-component-lib/utils.ts
  • packages/vue/tsconfig.json
  • patches/@stencil__vue-output-target.patch
  • testing/visual-testing/tsconfig.test.json

"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": ["dom", "es2017"],
"lib": ["dom", "es2020"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In TypeScript, what are the runtime implications of setting "compilerOptions.lib": ["dom","es2020"] while keeping "compilerOptions.target": "es2015", and what polyfill strategy is recommended for published libraries?

💡 Result:

In TypeScript, the "lib" and "target" compiler options serve distinct, non-overlapping roles [1][2]. The "target" option determines the ECMAScript version to which your TypeScript code is transpiled (e.g., downleveling arrow functions to standard functions) [3][4]. Conversely, "lib" specifies which type definitions are included in the compilation, which dictates which global JavaScript APIs (like "document" or "Promise") are available for the compiler to recognize during type-checking [1][4]. Setting "compilerOptions.lib" to ["dom", "es2020"] while keeping "compilerOptions.target" at "es2015" creates a mismatch between what the compiler recognizes and what it emits [2][5]. Specifically: 1. Runtime Implications: The compiler will permit the use of ES2020 APIs (e.g., BigInt, String.prototype.matchAll) and DOM APIs because they are defined in "lib" [1][2][6]. However, because "target" is set to "es2015", TypeScript will not automatically downlevel ES2020 syntax (if any were used) or provide polyfills for these features [3][5]. Your code will run in an ES2015-compatible environment, but it will throw runtime errors if it attempts to call an ES2020 API that does not exist natively in the target environment without accompanying polyfills [2][6]. 2. Polyfill Strategy for Published Libraries: It is highly recommended that library authors avoid bundling polyfills directly in their packages [7]. Bundling polyfills can lead to namespace pollution (if global polyfills are used) and significantly bloat bundle sizes for consumers who may already provide their own polyfills [8][7]. Recommended practices include: - Document Requirements: Clearly document the minimum runtime environment requirements (e.g., browsers supporting ES2020, or Node.js versions) in the library's README [8][7]. - Use "Pure" Polyfills: If necessary, use tools like @babel/plugin-transform-runtime, which injects "pure" polyfills (imported as modules) that do not pollute the global scope [9][7]. - Rely on Peer Dependencies: Alternatively, instruct users to provide necessary polyfills themselves, a standard pattern for many large libraries [7]. - Keep "lib" and "target" Synced: Unless you have specific reasons to decouple them (e.g., advanced polyfill management), it is best practice to keep "lib" and "target" roughly in sync to ensure your code's type-checked features match your runtime capabilities [5].

Citations:


🏁 Script executed:

# First, let's find and read the tsconfig.json file in question
fd -t f "tsconfig.json" packages/angular

# Read the specific file with context around lines 19 and 32
if [ -f "packages/angular/tsconfig.json" ]; then
  echo "=== Full tsconfig.json content ==="
  cat -n packages/angular/tsconfig.json
fi

Repository: siemens/ix

Length of output: 1582


🏁 Script executed:

# Check for ng-packagr configuration
fd -t f "ng-packagr.json|package.json" packages/angular | head -5

# Read the package.json to understand the library setup
if [ -f "packages/angular/package.json" ]; then
  echo "=== packages/angular/package.json ==="
  cat packages/angular/package.json
fi

# Check for any README or documentation about requirements
fd -t f "README.md" packages/angular

Repository: siemens/ix

Length of output: 1676


🏁 Script executed:

# Read the README
if [ -f "packages/angular/README.md" ]; then
  echo "=== packages/angular/README.md ==="
  cat packages/angular/README.md
fi

# Check the main ng-package.json
if [ -f "packages/angular/ng-package.json" ]; then
  echo -e "\n=== packages/angular/ng-package.json ==="
  cat packages/angular/ng-package.json
fi

Repository: siemens/ix

Length of output: 621


Align lib and target configuration or explicitly document runtime ES2020+ requirement.

The lib: ["dom", "es2020"] on line 19 with target: "es2015" on line 32 creates a mismatch where the compiler permits ES2020 APIs during type-checking but only transpiles to ES2015 syntax. While the library's peer dependency on @angular/core >=20.0.0 implies ES2020+ runtime support, this alignment gap should be resolved to prevent accidental API usage that could fail in edge cases and to make runtime requirements explicit. Either sync lib and target to "es2020" or add explicit documentation of the minimum runtime environment (ES2020+ support required due to Angular 20.0.0+ peer dependency).

🤖 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/angular/tsconfig.json` at line 19, The `lib` configuration on line
19 is set to ["dom", "es2020"] while the `target` configuration on line 32 is
set to "es2015", creating a mismatch where ES2020 APIs are permitted during
type-checking but the code is only transpiled to ES2015. Either update both
`lib` and `target` to consistently use "es2020" since the Angular 20.0.0+ peer
dependency requires ES2020+ runtime support, or if keeping the current
transpilation target, update the `lib` to ["dom", "es2015"] and add explicit
documentation in a README or contributing guide clearly stating that the library
requires an ES2020+ runtime environment due to its Angular 20.0.0+ peer
dependency.

Source: Coding guidelines

@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 (2)
package.json (2)

54-55: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the Yarn-specific postinstall-postinstall dependency, or verify a Yarn 1 requirement.

postinstall-postinstall is documented by patch-package for Yarn 1 behavior, while this repository’s scripts use pnpm; pnpm also has native dependency patching support. The added package appears unnecessary for the shown workflow. (npmjs.com)

🤖 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 `@package.json` around lines 54 - 55, Remove the Yarn-specific
postinstall-postinstall dependency from the dependencies near patch-package,
unless the repository explicitly requires Yarn 1; if Yarn 1 is required, verify
and document that requirement while preserving the existing pnpm workflow.

33-34: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Keep patch-package on one lifecycle hook
pnpm install runs both prepare and postinstall at the workspace root, so this applies the patch step twice. Keep a single hook here—postinstall is enough—and drop the postinstall-postinstall helper unless you need Yarn-specific behavior.

🤖 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 `@package.json` around lines 33 - 34, Remove the patch-package invocation from
the prepare script in package.json, keeping it only under postinstall so pnpm
install applies patches once. Also remove the postinstall-postinstall helper
unless it is required for Yarn-specific behavior.
🤖 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 `@package.json`:
- Around line 54-55: Remove the Yarn-specific postinstall-postinstall dependency
from the dependencies near patch-package, unless the repository explicitly
requires Yarn 1; if Yarn 1 is required, verify and document that requirement
while preserving the existing pnpm workflow.
- Around line 33-34: Remove the patch-package invocation from the prepare script
in package.json, keeping it only under postinstall so pnpm install applies
patches once. Also remove the postinstall-postinstall helper unless it is
required for Yarn-specific behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f1a43dd-92e7-4f81-b053-9995ad01dd43

📥 Commits

Reviewing files that changed from the base of the PR and between aa779c4 and c0e7d35.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • packages/vue/tsconfig.json

@GayatriK2002

Copy link
Copy Markdown
Collaborator Author

Closing this PR due to persistent merge conflicts that were difficult to resolve. I've opened a new PR, #2654 , with the same changes. Please continue the review there.

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