Closed Bug 1898543 Opened 9 months ago Closed 7 months ago

Add label as an l10n attr by default on moz-button

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: hjones, Unassigned)

References

(Blocks 1 open bug)

Details

Currently any instance of moz-button that sets the label attribute using a Fluent ID has to add data-l10n-attrs="label" to the markup to get things working properly. It would be a nice enhancement to add this by default in the connecteCallback so that instances don't have to sprout attributes just to set a label:

connectedCallback() {
  super.connectedCallback();
  this.dataset.l10nAttrs = "label";
}

If/when we do this we may also wan to clean up any existing usage of data-l10n-attrs on moz-button.

This was covered by the work done for Bug 1901336

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.