-
Notifications
You must be signed in to change notification settings - Fork 139
fix(core/dropdown-button): accessibility consistency in dropdown-button #2585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
GayatriK2002
wants to merge
6
commits into
siemens:main
from
GayatriK2002:fix-4336/dropdown-accessibility-update
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
27e316c
fix for space/enter in dropdown examples
GayatriK2002 82e7cee
updated preview example's css for extra width issue
GayatriK2002 c70be6d
Merge branch 'main' into fix-4336/dropdown-accessibility-update
GayatriK2002 3430d46
added patch in vue wrapper for symbol() issue
GayatriK2002 aa779c4
Merge branch 'main' into fix-4336/dropdown-accessibility-update
GayatriK2002 c0e7d35
Merge branch 'main' into fix-4336/dropdown-accessibility-update
GayatriK2002 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ES2017", | ||
| "target": "ES2020", | ||
| "lib": [ | ||
| "dom", | ||
| "dom.iterable", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| diff --git a/dist/runtime.cjs.js b/dist/runtime.cjs.js | ||
| index 0000000..0000000 100644 | ||
| --- a/dist/runtime.cjs.js | ||
| +++ b/dist/runtime.cjs.js | ||
| @@ -114,7 +114,7 @@ exports.createSsrApp = createSsrApp; | ||
| * you to check if the key exists for Vue <3.1.0 | ||
| * and then check if it is not undefined for Vue >= 3.1.0. | ||
| * See https://github.com/vuejs/vue-next/issues/3889 | ||
| */ | ||
| -const EMPTY_PROP = Symbol(); | ||
| +const EMPTY_PROP = {}; | ||
| const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP }; | ||
| const getComponentClasses = (classes) => { | ||
| return classes?.split(' ') || []; | ||
| diff --git a/dist/runtime.js b/dist/runtime.js | ||
| index 0000000..0000000 100644 | ||
| --- a/dist/runtime.js | ||
| +++ b/dist/runtime.js | ||
| @@ -114,7 +114,7 @@ export { createSsrApp }; | ||
| * you to check if the key exists for Vue <3.1.0 | ||
| * and then check if it is not undefined for Vue >= 3.1.0. | ||
| * See https://github.com/vuejs/vue-next/issues/3889 | ||
| */ | ||
| -const EMPTY_PROP = Symbol(); | ||
| +const EMPTY_PROP = {}; | ||
| const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP }; | ||
| const getComponentClasses = (classes) => { | ||
| return classes?.split(' ') || []; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐งฉ 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:
Repository: siemens/ix
Length of output: 1582
๐ Script executed:
Repository: siemens/ix
Length of output: 1676
๐ Script executed:
Repository: siemens/ix
Length of output: 621
Align
libandtargetconfiguration or explicitly document runtime ES2020+ requirement.The
lib: ["dom", "es2020"] on line 19 withtarget: "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 synclibandtargetto "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
Source: Coding guidelines