ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[Avatar group][A11Y]: [A] 2.5.3 The accessible name of any interactive element should contain its visible text label.

Open MaksymZahreba opened this issue 7 months ago • 5 comments

Bug Description

Issue found by a11y tool Siteimprove, caused by difference in naming of button and its label.

Note: in v1 button in shadow dom did not have the label attribute and issues is not triggered

Affected Component

Avatar Group

Expected Behaviour

No [A] level a11y issues found.

Isolated Example

No response

Steps to Reproduce

  1. launch Siteimprove tool on page with avatar group component

Log Output, Stack Trace or Screenshots

Individual type set: Image

Image

Same issue is triggered for Group type:

Image

Image

Priority

Medium

UI5 Web Components Version

2.10.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SAP \ UDEx

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

MaksymZahreba avatar May 22 '25 11:05 MaksymZahreba

Hi @SAP/ui5-webcomponents-topic-p,

Could you please check?

As I understand the issue it's about that the descriptive text doesn't corresponds to the one used into the content.

Regards, Nayden

nnaydenow avatar May 22 '25 13:05 nnaydenow

Hi @MaksymZahreba,

We usually check accessibility using Axe and AMP (Access Assistant). I just ran both on the Avatar Group component and neither showed any issues with the labels.

Can you point us to a specific WCAG requirement that isn’t met? It would also help if you explain how this affects users. That way, we can understand the impact and prioritize the fix.

Also, just to confirm: are you expecting the "+N" button (that shows how many avatars are hidden) to include the "+N" text in the label - for both individual and group types?

Thanks. Dobrin

dobrinyonkov avatar Jun 02 '25 06:06 dobrinyonkov

Hi @dobrinyonkov , The WCAG requirement 2.5.3 https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html

This for example affects users that use voice controls which makes them unable to interact with elements due to difference in label and displayed content.

The set text to display and its aria-label should be the same. To add description for elements it is recommended to use <aria-labeledby>

//rough code example// <ui5-button class="ui5-avatar-group-overflow-btn ui5-avatar-group-overflow-btn-s" ui5-button="" design="Default" type="Button" accessible-role="Button" desktop="" id="1" aria-labelledby="1 2">+6</ui5-button> - here added id="1" and aria-labelledby="1 2" , removed accessible-name <button type="button" class="ui5-button-root" data-sap-focus-ref="true" tabindex="0" part="button" role="button"> - aria-label removed <span id="2">more avatars</span> - added, it is supposed to be hidden with CSS styles and used for aria-labeledby

Image

Image

Regards, Maksym

MaksymZahreba avatar Jun 02 '25 11:06 MaksymZahreba

Hello, everyone! The issue has been inactive for 21 days. If there are still questions or comments, please feel free to continue the discussion. Inactive issues will be closed after 7 days!

github-actions[bot] avatar Jun 24 '25 00:06 github-actions[bot]

Hi, any progress on the issue?

MaksymZahreba avatar Jun 24 '25 09:06 MaksymZahreba

Hello @MaksymZahreba,

Apologies for the late response. In the latest version of the Avatar Group:

  • For type individual, the overflow button is labeled: “+N Activate for complete list.”
Image
  • For type group, there was no change as the whole group was labeled with custom text: “Conjoined avatars. Y displayed, N hidden. Activate for complete list.” This ensures users are clearly informed about how many avatars are shown and hidden.

I hope this helps. Let me know of any additional concerns.

Kind regards, Dobrin

dobrinyonkov avatar Sep 05 '25 11:09 dobrinyonkov

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Sep 18 '25 05:09 github-actions[bot]