X Tutup
Skip to content

fix(aria/menu): remove aria-label binding from menu item value#32894

Open
mhoechtl wants to merge 1 commit intoangular:mainfrom
mhoechtl:fix-menu-item-aria-label
Open

fix(aria/menu): remove aria-label binding from menu item value#32894
mhoechtl wants to merge 1 commit intoangular:mainfrom
mhoechtl:fix-menu-item-aria-label

Conversation

@mhoechtl
Copy link

@mhoechtl mhoechtl commented Mar 5, 2026

Removes the [attr.aria-label]="value()" host binding from ngMenuItem.

Binding value to aria-label causes several issues:

  1. Couples application logic/data (value) with UI accessibility state.
  2. Creates i18n issues if the value is a non-localized identifier.
  3. Overwrites explicitly provided aria-label attributes on the host element.
  4. Overrides the native accessible name derivation (textContent) of the menuitem.

Fixes #32893

Removes the `[attr.aria-label]="value()"` host binding from `ngMenuItem`.

Binding `value` to `aria-label` causes several issues:
1. Couples application logic/data (value) with UI accessibility state.
2. Creates i18n issues if the value is a non-localized identifier.
3. Overwrites explicitly provided `aria-label` attributes on the host element.
4. Overrides the native accessible name derivation (textContent) of the menuitem.

Fixes angular#32893
@pullapprove pullapprove bot requested review from ok7sai and wagnermaciel March 5, 2026 23:09
Copy link
Member

@ok7sai ok7sai left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! The label input overwrites the aria-label is certainly an unwanted behavior.

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.

bug(aria/menu): menu item erroneously binds value to aria-label

2 participants

X Tutup