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 #30724

Closed
QuangThuanDinh opened this issue Jan 11, 2021 · 8 comments
Labels
Component: SectionList Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Resolution: Locked This issue was locked by the bot.

Comments

@QuangThuanDinh
Copy link

QuangThuanDinh commented Jan 11, 2021

Description

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

React Native version:

Run react-native info in your terminal and copy the results here.
0.6.3

Steps To Reproduce

Related to this example: https://reactnative.dev/docs/sectionlist
The DOM 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 Results

SessionList should support group for each session, so that the screen reader will figure out the session title and will speak the title when focus to the session item

<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>

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
You may provide a screenshot of the application if you think it is relevant to your bug report.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

@chrisglein chrisglein added the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Jan 12, 2021
@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Jan 12, 2021
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@chrisglein chrisglein added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jan 12, 2021
@chrisglein
Copy link

Can you run the info command and supply your version verbatim? 0.6.3 almost looks like 0.63, but isn't.

You're speaking in terms of div which makes me wonder is this a React question or a ReactNative question? Are you using ReactNative for Web? Can you provide a more standalone repro to show what you're hitting.

@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@QuangThuanDinh
Copy link
Author

@chrisglein thank you for your response, yes, I'm using ReactNative for web.
I have a problem with the accessibility requirement, that in the SessionList, it's support the header in each session, but it's not put the items in that session to the group or subMenu, so that the screen reader will not speak the session/group title when focus to the item.

Thank you

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jan 12, 2021
@chrisglein
Copy link

Okay, that explains it. And I see now you're going off the Snack in the documentation, makes sense.
This repo (github.com/facebook/react-native) covers the core infrastructure of React Native that includes Android and iOS support. Anything additional like Web, Windows, or macOS support are handled by separate repositories with their own issue tracking. You'll want to open this issue on the React Native for Web repository, which is here: https://github.com/necolas/react-native-web/issues

@necolas
Copy link
Contributor

necolas commented Jan 13, 2021

The other platforms "vendor" these JS components from react-native. The RN implementations which don't provide enough flexibility around how sections are annotated with accessibility props, or for creating relationships like groups of items, or for associations between headings and their content. I don't know that it's practical for other platforms to fork all the list components to fix this, and it might actually be needed for iOS/Android too.

@necolas
Copy link
Contributor

necolas commented Jan 22, 2021

I think we should extract these list components into external packages. It's not sustainable to have these JS components in this repo if they aren't going to be maintained to address accessibility and performance issues that other platforms surface

@QuangThuanDinh
Copy link
Author

as mentioned from Chrisglein, seem like this repo only handler the core or native device. I agree that we should do something to separate the JS components out of this

@facebook facebook locked as resolved and limited conversation to collaborators Jan 12, 2022
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: SectionList Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants