Skip to content

Commit 2df5448

Browse files
committed
fix(aria/menu): Add label property for proper aria-label
1 parent a3f2ec8 commit 2df5448

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/aria/menu/menu-item.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import type {MenuBar} from './menu-bar';
3838
'(focusin)': '_pattern.onFocusIn()',
3939
'[attr.tabindex]': '_pattern.tabIndex()',
4040
'[attr.data-active]': 'active()',
41+
'[attr.aria-label]': 'value()',
4142
'[attr.aria-haspopup]': 'hasPopup()',
4243
'[attr.aria-expanded]': 'expanded()',
4344
'[attr.aria-disabled]': '_pattern.disabled()',
@@ -54,7 +55,7 @@ export class MenuItem<V> {
5455
/** The unique ID of the menu item. */
5556
readonly id = input(inject(_IdGenerator).getId('ng-menu-item-', true));
5657

57-
/** The value of the menu item. */
58+
/** The value of the menu item, used as the default aria-label */
5859
readonly value = input.required<V>();
5960

6061
/** Whether the menu item is disabled. */

0 commit comments

Comments
 (0)