@angular/aria 21.2.7 → 21.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/aria",
3
- "version": "21.2.7",
3
+ "version": "21.2.9",
4
4
  "description": "Angular Aria",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "homepage": "https://github.com/angular/components#readme",
14
14
  "peerDependencies": {
15
- "@angular/cdk": "21.2.7",
15
+ "@angular/cdk": "21.2.9",
16
16
  "@angular/core": "^21.0.0 || ^22.0.0"
17
17
  },
18
18
  "devDependencies": {
Binary file
package/types/menu.d.ts CHANGED
@@ -174,11 +174,14 @@ declare class Menu<V> {
174
174
  /** The menu ui pattern instance. */
175
175
  readonly _pattern: MenuPattern<V>;
176
176
  /**
177
- * The menu items as a writable signal.
177
+ * The menu item patterns for the menu items that are direct children of this menu, passed
178
+ * to the menu pattern.
178
179
  *
179
- * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where
180
- * sometimes the items array is empty. The bug can be reproduced by switching this to use a
181
- * computed and then quickly opening and closing menus in the dev app.
180
+ * Note: contentChildren has an issue where it will return a successively smaller list
181
+ * each time that the menu is open and closed, eventually resulting in an empty list.
182
+ * The workaround is to trigger a recomputation of this signal whenever the menu is opened
183
+ * or closed, by calling this._pattern.visible() in the signal body. Otherwise, computed could
184
+ * not be used and would have to rebuild the list each time this method is called.
182
185
  */
183
186
  private readonly _itemPatterns;
184
187
  /** Whether the menu is visible. */