Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-list): change role mappings so no interactive elements are ne… #3952

Merged
merged 3 commits into from
Sep 20, 2021

Conversation

dobrinyonkov
Copy link
Contributor

@dobrinyonkov dobrinyonkov commented Sep 17, 2021

Fixes: #3927

Issue: Interactive elements should not be nested inside element with role option.
There are nested interactive elements inside list items in selection mode - ui5-radio-button & ui5-checkbox.

Summary of changes:

  • the role mapping is changed from listbox -> option[] to list -> listitem[];
  • the selected state announcement is handled separately with aria-describedby as the listitem role does not support aria-selected;
  • aria-multiselectable is removed because it is not supported on the role list;

Note: aria-labelledby chould not be used for the "Selected" & "Not Selected" texts as NVDA reads the whole value of the attribute when some of its references changes content. In this case - the whole content of the item.

@ilhan007
Copy link
Member

ilhan007 commented Sep 17, 2021

if you change the accessible-role default to "list", please update the Notification examples that currently set that value explicitly. Actually the property has been specifically introduced for the use case of notification list, so you might even make the property private if you prefer not to support it as public

<ui5-list id="notificationList" header-text="Notifications grouped" accessible-role="list">

ilhan007
ilhan007 previously approved these changes Sep 20, 2021
@ilhan007 ilhan007 merged commit 6d98d0c into SAP:master Sep 20, 2021
ilhan007 pushed a commit that referenced this pull request Sep 20, 2021
#3952)

Fixes: #3927

Issue: Interactive elements should not be nested inside element with role option.
There are nested interactive elements inside list items in selection mode - ui5-radio-button & ui5-checkbox.

Summary of changes:

the role mapping is changed from listbox -> option[] to list -> listitem[];
the selected state announcement is handled separately with aria-describedby as the listitem role does not support aria-selected;
aria-multiselectable is removed because it is not supported on the role list;
Note: aria-labelledby should not be used for the "Selected" & "Not Selected" texts as NVDA reads the whole value of the attribute when some of its references changes content. In this case - the whole content of the item.
@dobrinyonkov dobrinyonkov mentioned this pull request Sep 20, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][SF][Urgent - Expect WithIn One Week][UI5-List] Ensure interactive controls are not nested
2 participants