Skip to content

[Bug Report][4.2.4] VImg with a non-empty alt exposes the image twice to assistive technologies #23248

Closed as not planned

Description

@vandersontf

Environment

Vuetify Version: 4.2.4
Vue Version: 3.5.43
OS: Windows 10 (current)

Steps to reproduce

  1. Open the reproduction and inspect the image in DevTools > Elements > Accessibility (or list images with a screen reader).

Expected Behavior

The image is exposed once to assistive technologies, as a single img named "Vuetify logo".

Actual Behavior

The alternative text is applied twice: the root gets role="img" and aria-label="Vuetify logo", and the inner gets alt="Vuetify logo". The Chromium accessibility tree shows two img nodes named "Vuetify logo" (none ignored), so screen readers announce the same image twice.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

VImg.tsx sets aria-label and role="img" on the root and also passes alt to the inner image (and to the lazy-src image). A possible fix: render the inner images with alt="" when the root carries role="img". Related: #23111 (empty aria-label for decorative images, already fixed).

Activity

  1. J-Sek commented on Oct 7, 2026

    @J-Sek
    Contributor
  2. J-Sek commented on Oct 7, 2026

    @J-Sek
    Contributor

    Works fine on NVDA and Orca (althought I need to force the focus on .v-img element, otherwise it says nothing).

    Which screenreader is affected?

  3. KaelWD commented on Oct 20, 2026

    @KaelWD
    Member

    aria-label probably should have been removed in #16841

  4. KaelWD commented on Oct 20, 2026

    @KaelWD
    Member

    mdn for role="img":

    browsers automatically apply role presentation to all descendant elements of any img element as it is a role that does not support semantic children.

    I hate accessibility tools so much they're all so janky and there's no proper specification for how everything should behave.

  5. J-Sek commented on Oct 20, 2026

    @J-Sek
    Contributor

    Closing, no reproduction on screen reader, no other comment from the author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions