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

Galleria: 'Indicator' Slot, Keyboard Accessibility Broken #6899

Closed
jacksonrya opened this issue Nov 30, 2024 · 2 comments
Closed

Galleria: 'Indicator' Slot, Keyboard Accessibility Broken #6899

jacksonrya opened this issue Nov 30, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jacksonrya
Copy link

Describe the bug

When using the #indicator slot, keyboard accessibility is lost.

Using the default indicators generates button tags that can be navigated with arrow keys. When using the slot, rather than the contents of the slot becoming the child of the accessible button, it replaces the button.

I'd like to use a custom visual component as an indicator, while maintaining keyboard navigation accessibility.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-9wjvhn?file=src%2FApp.vue

PrimeVue version

4.2.4

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

Go to Stackblitz link. The below instructions are copied to the stackblitz.

  1. Navigate indicators with keyboard
    a. Click image
    b. Press 'Tab' to move focus onto indicators
    c. Press arrow keys to move focus
  2. Add custom indicators via slot
    a. Uncomment the indicator slot (line 62) by deleting the wrapping comment block syntax
  3. Attempt (and fail) to navigate indicators with keyboard
    a. Go through Step 1 and notice how it doesn't work.

Expected behavior

I expect keyboard accessibility to remain the same when using a custom indicator component via the Galleria's provided #indicator slot.

@jacksonrya jacksonrya added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 30, 2024
@jacksonrya jacksonrya changed the title Galleria: Indicator Slot Accessibility Galleria: 'Indicator' Slot, Keyboard Accessibility Broken Nov 30, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Due to PrimeVue team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@tugcekucukoglu tugcekucukoglu removed the Resolution: Help Wanted Issue or pull request requires extra help and feedback label Dec 11, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.2.5 milestone Dec 11, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Dec 11, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Dec 11, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Dec 11, 2024
@tugcekucukoglu
Copy link
Member

You could use like this:

<template #indicator="slotProps">
      <div class="custom-component" :tabindex="slotProps.tabindex">{{slotProps.index}}</div>
    </template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

No branches or pull requests

2 participants