Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Accessibility enhancements #243

@Jackleberry

Description

@Jackleberry

I'm trying to add a couple of accessibility features to a fork of react-infinite. What I'm aiming for is the following structure:

<div role="feed" aria-setsize="-1" aria-busy={true/false}>
  <div role="article"></div>
  <div role="article"></div>
  <div role="article"></div>
</div>

The important pieces here are that the role="feed" is the outer div and it directly contains the article divs (which are the children that I would pass in to react-infinite).

At the moment this is not possible because there is a nested div that sits directly inside the outer div and that nested div contains the children. This is from the react-infinite.jsx code:

<div
        className={this.computedProps.className}
        ref={c => {
          this.scrollable = c;
        }}
        style={this.utils.buildScrollableStyle()}
        onScroll={this.utils.nodeScrollListener}
      >
        <div
          ref={c => {
            this.smoothScrollingWrapper = c;
          }}
          style={infiniteScrollStyles}
        >

I would like to remove this nested div and apply infiniteScrollStyles to the outer div and then I would be able to implement the structure as above.

My question is, do you see any issue in removing that nested div? From what I can tell and from testing it locally, it should be fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions