Skip to content

[app-layout] Localize the drawer toggle aria-label attribute via the i18n property #3214

@vursen

Description

@vursen

Describe your motivation

Since #3192, the app-layout has the support of an i18n property for localization. The app-layout-drawer-toggle has an ariaLabel property that currently defaults to Toggle (proof). It was discussed internally that this property is a good candidate to be made ​configurable via the app-layout i18n property.

Presumably, it is not going to be a breaking change because the user anyway will be able to configure the aria-label attribute via both the i18n property and adding the attribute manually. What will change is that the default value for the attribute will come from the i18n property instead of the ariaLabel property.

Describe the solution you'd like

  • Drop the ariaLabel property for the drawer-toggle if it is not needed anymore.
  • Add a drawerToggle property to the i18n property with the default value Toggle.
  • Set the aria-label attribute to i18n.drawerToggle at initialization if the user hasn't provided a custom one.
  • When the i18n property changes, update the aria-label attribute if the user hasn't provided a custom one.

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