Skip to content

Conversation

@hinzzx
Copy link
Contributor

@hinzzx hinzzx commented Jan 27, 2026

Currently our <ui5-menu> component uses the <ui5-list> as its internal composite.

When a Menu (or any List) is rendered without any accessible description, the aria-description attribute would be rendered with an empty string value like this:

<ul role="menu" aria-description="">

We found this issue while testing our Menu's accessibility samples in the Accessibility Hub.
This violates ARIA 1.2 and WCAG 2.2 AA standards because:

Empty ARIA attributes are invalid - they create noise for screen readers
Validation tools flag this - AXE and AccessContinuum report this as an error

That's why I suggest we use conitional || undefined pattern which ensures:

If ariaDescriptionText has a value → renders aria-description="value"
If ariaDescriptionText is empty/falsy → does not render the attribute at all

@ui5-webcomponents-bot
Copy link
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 27, 2026 09:04 Inactive
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.

3 participants