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

List and ListItem accessibility roles should be set to list and listitem if selection mode is None

Open mastanshaikk opened this issue 6 years ago • 3 comments

Describe the bug List and ListItem accessibility roles should be set to "list" and "listitem" if selection mode is None, as listbox and option role combination represents a select/option semantics but not list semantics, as a result the content of ui5-list element are not accessible via screen reader virtual cursor navigation using arrow keys. A role "option" masks all ui5-li or ui5-li-custom except to the first list item element contents from displaying in the screen reader elements list, for NVDA pressing Insert + F7 screen reader elements list can be displayed. List.js: https://github.com/SAP/ui5-webcomponents/blob/master/packages/main/src/List.js#L197 is there a way to override? ListItem.js: https://github.com/SAP/ui5-webcomponents/blob/master/packages/main/src/ListItem.js#L297 is there a way to override?

To reproduce Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/List/ for a list with selection mode="None" role of listbox and option are applied.

Expected behavior ui5-list and ui5-li should be have a role of "list" and "listitem" for None selection mode.

Affected components (if known) StandardListItem, CustomListItem

mastanshaikk avatar Sep 22 '20 00:09 mastanshaikk

Hi @mastanshaikk

As you can see, currently we have provided default values for both properties, which are suitable for all cases. If you need a way to override the custom values, we can provide a way to do so. Please, let me know if overriding the default values would be a solution for your use case.

fifoosid avatar Sep 23 '20 05:09 fifoosid

Hi @fifoosid

Yeah, that works, if the default roles can be overridden.

mastanshaikk avatar Sep 23 '20 08:09 mastanshaikk

Issue is resolved by the PRs

fifoosid avatar Sep 28 '20 11:09 fifoosid