Skip to content

NcButton accessibility warning fires twice on every logged-in page load (UserMenu, MainMenu) #60292

@bigsearcher

Description

@bigsearcher

Steps to reproduce

  1. Log into Nextcloud (observed on stable33, 33.0.3.2)
  2. Open the browser DevTools console
  3. Load any page (e.g. dashboard, files, an app — any post-login page that renders the top header)

Expected

No accessibility warnings from @nextcloud/vue for buttons that ship with NC core.

Actual

Two identical warnings appear on first paint of every logged-in page:

```
[WARN] @nextcloud/vue: You need to fill either the text or the
ariaLabel props in the button component.
{ text: undefined, ariaLabel: null, uid: '', ... }
```

Stack-trace origins:

```
render @ NcButton-BaZAY-tN.mjs:236
...
(anonymous) @ UserMenu.js:15
initCore @ init.js:86
```

```
render @ NcButton-BaZAY-tN.mjs:236
...
(anonymous) @ MainMenu.js:27
initCore @ init.js:85
```

So one warning originates in the render path of `core/src/views/AccountMenu.vue` (via `UserMenu.js`) and the other in `core/src/components/AppMenu.vue` (via `MainMenu.js`).

Investigation

The two top-level components themselves bind `:aria-label` correctly:

  • `core/src/views/AccountMenu.vue` line 10: `:aria-label="t('core', 'Settings menu')"` on `NcHeaderMenu`
  • `core/src/components/AppMenu.vue` lines 10, 12, 19: all bind `:aria-label`

The offending `NcButton` is therefore in a sub-component along the render chain — likely one of `AccountMenuProfileEntry`, `AccountMenuEntry`, `NcAvatar`, `AppMenuEntry`, `NcActions`, or one of their internal NcButton instances — that renders an icon-only button without setting either `text` or `:aria-label`.

Environment

  • Nextcloud Server 33.0.3.2
  • Browser: Chrome 147 (also reproduces in other Chromium-based browsers)
  • `@nextcloud/vue` version: as bundled in 33.0.3

Why this matters

Beyond the noisy console: a button rendered without an accessible name is unannounced by screen readers. Two icon-only buttons in the top header (account avatar, app launcher) being unlabelled is a real a11y regression, not just a dev warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions