Fluentui: [Accessibillity] List Component sets role to 'list' for empty lists

Created on 6 Mar 2019  路  2Comments  路  Source: microsoft/fluentui

Environment Information

  • __Package version(s)__: 6.151.0
  • __Browser and OS versions__: Chrome - 72.0.3, Windows 10

Please provide a reproduction of the bug in a codepen:

https://codepen.io/preetriti1/pen/moOzVg

Actual behavior:

List component have role set to 'list' when there are no items in the list. When aria-role is set to 'list' it expects a childrole which is absent in case of empty lists.

Expected behavior:

The div rendering the list should not have the role set to 'list' when there are no items in the list to render.

Priorities and help requested:

Are you willing to submit a PR to fix? No

Requested priority: Normal

Products/sites affected: Azure LogicApps accessibility

Accessibility List Type

Most helpful comment

This accessibility issue looks to be valid given the w3 ARIA spec, specifically the Required Owned Elements section quoted below for role="list":

Lists contain children whose role is listitem, or elements whose role is group which in turn contains children whose role is listitem.
https://www.w3.org/WAI/PF/aria/roles#list

Should be a straightforward fix @aftab-hassan.

cc: @natalieethell

All 2 comments

This accessibility issue looks to be valid given the w3 ARIA spec, specifically the Required Owned Elements section quoted below for role="list":

Lists contain children whose role is listitem, or elements whose role is group which in turn contains children whose role is listitem.
https://www.w3.org/WAI/PF/aria/roles#list

Should be a straightforward fix @aftab-hassan.

cc: @natalieethell

:tada:This issue was addressed in #8337, which has now been successfully released as [email protected].:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings