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

AutoComplete: aria-hidden="true" on close chip console causes error #6141

Closed
bobby-driggs opened this issue Jul 29, 2024 · 13 comments
Closed
Assignees
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@bobby-driggs
Copy link

Describe the bug

Using the AutoComplete component, I noticed we have some aria errors. I also noticed this exists on the primevue website:

image

Reproducer

https://primevue.org/autocomplete/

PrimeVue version

4.0.2

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

Brave 1.68.131 (Chromium: 127.0.6533.73)

Steps to reproduce the behavior

Use AutoComplete component w/ multiple option, and see console errors when selecting multiple items

Expected behavior

No Aria errors

@bobby-driggs bobby-driggs added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 29, 2024
@Chrysochrome
Copy link

I’ve encountered this issue frequently in the Menu component. Clicking on any menu item triggers this error in the console, including in ContextMenu, Dock, Menu, Menubar, etc. The problem also exists on the PrimeVue website.

Reproducer

https://primevue.org/menubar/

@tugcekucukoglu
Copy link
Member

Screenshot 2024-08-02 at 12 43 46

I cannot replicate the problem. Am I missing something?
Extensions can cause these errors.

@hiddenyak
Copy link

With no extensions enabled, I get this bug on the PrimeVue website, interacting with any menu component exactly like Chrysochrome describes, on both Chrome and Edge but not Firefox.

Chrome Version 127.0.6533.89 (Official Build) (64-bit)
Edge Version 127.0.2651.74 (Official Build) (64-bit)
Firefox 128.0.3

@GerGotha
Copy link

GerGotha commented Aug 5, 2024

I have had similar issues with the Menu components. Strangely enough, for me it only occured as soon as I selected any element with the devtools element picker and interacted with a menu after doing so.
Tried with Firefox, Chrome and Edge.

@Aspyryan
Copy link

Aspyryan commented Aug 7, 2024

Can reproduce this as well on Edge (Version 127.0.2651.86). I also got this problem with primevue 3.52

@eneeio-nm
Copy link
Contributor

eneeio-nm commented Aug 9, 2024

I get the console error from Menu items:

screenshot-2024-08-09--10 20 34@2x

From what I can tell is it's complaining about this example:

screenshot-2024-08-09--10 21 47@2x

I'm using PrimeVue 4.0.4.

@eneeio-nm
Copy link
Contributor

eneeio-nm commented Aug 9, 2024

@tugcekucukoglu - I've created an example of this happening on Stackblitz, hopefully the issue can be fixed now.

@LanFeusT23
Copy link
Contributor

@tugcekucukoglu This seems to be a Chrome update, I've seen several other packages have that error now but it doesn't show on Firefox.

For example: ant-design/ant-design#50170

@tugcekucukoglu tugcekucukoglu added this to the 4.0.5 milestone Aug 13, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Aug 13, 2024
@Coops0
Copy link

Coops0 commented Aug 15, 2024

A temporary fix I have found to work for myself

const vFixAriaBug = {
  mounted(el: HTMLElement) {
    el.ariaHidden = null;
  },
  updated(el: HTMLElement) {
    el.ariaHidden = null;
  }
};

Then usable by

<template>
  <Menubar v-fix-aria-bug>
    <template>
        <router-link ...>
          <a v-fix-aria-bug ...>
        </router-link>
    </template>
  </Menubar>
</template>

@peacefulseeker
Copy link

For those, using primevue v3 Menu, as a temp fix,
you can pass pt prop with action(itemLink in past) attribute override.

Source for menu item(with action a tag) https://github.com/primefaces/primevue/blob/v3/components/lib/menu/Menuitem.vue

const accountMenuItems = ref([
    {
      label: () => `label`,
      command: () => router.push({ name: 'route' }),
    },
 ...
]);

<Menu
  @focus="onFocus"
  @blur="onBlur"
  :model="accountMenuItems"
  :pt="{
    // fixes https://github.com/primefaces/primevue/issues/6141
    action: {
      ariaHidden: false,
    },
  }"
  :popup="true" />

At least, the warning has gone in Chrome 127+

@reiven93
Copy link

If anyone is using SplitButton you can also PT the attr to the tiered menu item:

<SplitButton class="ml-1" :model="itemsSubMenu" :pt="{ pcMenu: { itemLink: { ariaHidden: false } } }"> </SplitButton>

@tugcekucukoglu
Copy link
Member

Still cannot replicate AutoComplete issue. I could see that there is a problem with anchor tags. Please follow this issue for menus: #6269

@tugcekucukoglu tugcekucukoglu removed this from the 4.0.5 milestone Aug 21, 2024
@bonniegrubbs
Copy link

bonniegrubbs commented Aug 27, 2024

To replicate, see the Primevue example here

I think the issue is from this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests