Skip to content

Changing language with aria-labels not correctly applied to elements #5495

@nfellinger

Description

@nfellinger

Which generators are affected?

  • All
  • HTML
  • React
  • Angular
  • Vue
  • Web components
  • Power Apps

Reproduction case

When setting an aria-label on a db-switch element, the label is incorrectly set when the language is changed via Angular languageService.

Following example:

<db-switch aria-label="{{'TEST_LABEL' | translate}}">
</db-switch>

With these language strings:
DE "TEST_LABEL": "Deutscher Text"
EN "TEST_LABEL": "English text"

The element is first rendered like this if we have DE as the default language:
Image

If we switch now to EN, the aria-label is also present in the host db-switch element, causing the screenreader to read out the label twice and in different translations
Image

Expected Behaviour

The aria-label attribute should not be set to the host element if the language is switched.

Screenshots

No response

Browser version

Chrome

Add any other context about the problem here.

I have not tested if this also happens with other db-ux elements or affects other attributes like aria-description.

Which DB business unit do you work for?

DB Systel GmbH (please name your customer below)

”DB Systel” please enter your customer / ”other” please enter your area or business unit.

DB InfraGO AG

What project are you working on?

EBuLa Rückfallebene (IRE)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions