Skip to content

[Accessibility] SectionList not render the group with title for each session #1873

Open
@QuangThuanDinh

Description

@QuangThuanDinh

The problem

When using SessionList, each item is rendered but don't have any associate with the header

How to reproduce
Related to this example: https://reactnative.dev/docs/sectionlist
The DOM will render like:

<div role="header">
    <div>Main dishes</div>
</div>
<div role="menuitem">
    <div>Pizza</div>
</div>
<div role="menuitem">
    <div>Burger</div>
</div>
  • Each group render 1 item for header and some items for the content. So that, all of them have equal level and the screen reader can not know the category of the menu item when focus to it.

Expected behavior
SessionList should support group/sub-menu for each session, so that the screen reader will figure out the session title and will speak the title when focus to the item within that session.

<div role="menuitem" aria-label="Main dishes">
    <div role="header">
        <div>Main dishes</div>
    </div>
    <div role="group" aria-label="Main dishes">
        <div role="menuitem">
            <div>Pizza</div>
        </div>
        <div role="menuitem">
            <div>Burger</div>
        </div>
    </div>
</div>

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.63
  • React (version): 0.63
  • Browser: all

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions