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

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

Open
QuangThuanDinh opened this issue Jan 12, 2021 · 4 comments
Labels
bug: react-native Bug associated with upstream React Native vendor code priority: low project:react-native-web Issue associated with react-native-web

Comments

@QuangThuanDinh
Copy link

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
@necolas
Copy link
Owner

necolas commented Jan 12, 2021

Please open an issue against React Native as this component is developed in that repo.

@QuangThuanDinh
Copy link
Author

@necolas I did open a ticket for React Native team and they provide this repo cause this issue is about DOM structure renderer - which seem like React Native web only:
facebook/react-native#30724

@necolas
Copy link
Owner

necolas commented Jan 13, 2021

I'll leave a comment there

@necolas
Copy link
Owner

necolas commented Jan 13, 2021

In the meantime, you can use aria-labelledby to make associations between the headings and the items in the group. It won't change the fact that you can't render the group wrapper but it should be an improvement.

@necolas necolas added the bug: react-native Bug associated with upstream React Native vendor code label Feb 1, 2021
@necolas necolas added the project:react-native-web Issue associated with react-native-web label Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: react-native Bug associated with upstream React Native vendor code priority: low project:react-native-web Issue associated with react-native-web
Projects
None yet
Development

No branches or pull requests

2 participants