Skip to content

Accessibility ion-list #19939

Closed
Closed
@stevenbriscoeca

Description

@stevenbriscoeca

I was wondering if there was any reason not adding roles to the ion list here :
https://ionicframework.com/docs/api/list

  <ion-list>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
  </ion-list>

would become

  <ion-list role="list">
    <ion-item role="listitem">
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item role="listitem">
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item role="listitem">
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item role="listitem">
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item role="listitem">
      <ion-label>Super Mario World</ion-label>
    </ion-item>
  </ion-list>

Because NVDA, JAWS and Voiceover will not understand those custom element and will not call them as a list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11yAccessibility related issuespackage: core@ionic/core packagetype: buga confirmed bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions