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

feat: Improve ion-reorder accessibility #29296

Open
3 tasks done
dpalou opened this issue Apr 8, 2024 · 2 comments
Open
3 tasks done

feat: Improve ion-reorder accessibility #29296

dpalou opened this issue Apr 8, 2024 · 2 comments
Assignees
Labels

Comments

@dpalou
Copy link

dpalou commented Apr 8, 2024

Prerequisites

Describe the Feature Request

I'm not an accessibility expert so I might be wrong, but I think ion-reorder is not accessible. Some of the things that could be improved are:

  • According to WCAG 2.2 Success Criterion 2.5.7: Dragging Movements (Level AA), there should be an alternative using a "single pointer mode of operation without the need for the dexterity required to drag elements". I'm not sure what this means though. maybe there should be some arrows or similar to move the elements with clicks.
  • Along with the previous point, maybe users should be able to move the elements using keyboard. I guess that if some arrows are added and they're clickable by keyboard, this point would be fulfilled too.
  • When ion-reorder is just an "icon" (not using "Reorder Wrapper"), it would be nice if Ionic automatically calculated the aria-label of ion-reorder based on the item contents (unless it already has an aria-label, aria-labelledby or similar). I think other Ionic components do something similar. Also, I guess the aria-label should also explain how to move the item.
  • When using Talkback and selecting the item's label (again, not using "Reorder Wrapper"), Talkback says "double tap to activate" but there is nothing to activate there.
  • When an item is repositioned, I guess there should be some message in an "aria-live" element.

Describe the Use Case

As a visual impaired user, I want to be able to use ion-reorder easily (using Talkback/Voiceover or a keyboard).

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

This is the template I used, in case it's helpful:

<ion-reorder-group [disabled]="dragDisabled" (ionItemReorder)="handleReorder($event.detail)">
    @for (item of items; track $index) {
      <ion-card>
          <ion-item class="ion-text-wrap">
              <ion-label [id]="item.id">
                  {{ item.label }}
              </ion-label>
              <ion-reorder [attr.aria-labelledby]="item.id" slot="end" />
          </ion-item>
      </ion-card>
    }
</ion-reorder-group>

Additional Information

No response

@liamdebeasi
Copy link
Contributor

Hey there,

Can you provide a full code sample that I can use to reproduce each behavior?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Apr 8, 2024
@ionitron-bot ionitron-bot bot removed the triage label Apr 8, 2024
@dpalou
Copy link
Author

dpalou commented Apr 9, 2024

Hi Liam,

if you mean some code for each of the possible improvements, right now I haven't done anything to improve them (besides adding an aria-label to ion-reorder). We might add some elements on top of ion-reorder to fix some of the accessibility issues (I still need to talk about this with our UX), I'll be happy to share the code with you once I'm done.

If you mean some code to reproduce the problems, our app is quite complex so it wouldn't be easy for you to replicate it with our code. But basically adding ion-reorder anywhere would have those accessibility problems.

Thank you!

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants