Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Nested lists #192

Closed
jurokapsiar opened this issue Sep 6, 2018 · 4 comments
Closed

Nested lists #192

jurokapsiar opened this issue Sep 6, 2018 · 4 comments
Labels
⚙️ enhancement New feature or request vsts Paired with ticket in vsts
Projects

Comments

@jurokapsiar
Copy link
Contributor

Feature Request

Nested (closable) list

Problem description

Even though Accordion does conform ARIA best practices and renders correct HTML from this point of view, we were not able to successfully use it in the nested lists use case (similar to https://stardust-ui.github.io/react/components/accordion#variations-list)

The HTML structure does not allow the screen readers to navigate correctly using virtual cursor.

To achieve the correct navigation, the structure needs to be changed in a way that resembles nested lists:

<ul id="main" style="list-style-type:none">
  <li><a href="#">Header 1</a>
    <div class="panel-content">
      <ul>
        <li><a href="#">item 1</a></li>
        <li><a href="#">item 2</a></li>
        <li><a href="#">item 3</a></li>
      </ul>
    </div>
  </li>
...
</ul>

Proposed solution

Either add a new variant of Accordion that renders this nested structure or create a separate component that allows that.

@notandrew
Copy link
Member

Is this a common pattern/component that we'll need to support, or should this be built as a one-off component?

@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Oct 23, 2018
@levithomason levithomason added this to jurokapsiar in Core Team Nov 16, 2018
@levithomason levithomason added ⚙️ enhancement New feature or request and removed ⚙️ enhancement New feature or request labels Nov 30, 2018
@levithomason
Copy link
Member

Agreed. From a UI component usability standpoint, we need to support nested <List /> components as well as nested <Accordion /> components.

@levithomason
Copy link
Member

We should take our new Tree component and extend it with design features necessary to create other variations.

@pkumarie2011
Copy link
Collaborator

Tree component is the solution here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ enhancement New feature or request vsts Paired with ticket in vsts
Projects
No open projects
Core Team
  
jurokapsiar
Development

No branches or pull requests

4 participants