Closed Bug 1848371 Opened 2 years ago Closed 1 year ago

Allow common fluent attributes without data-l10n-attrs

Categories

(Toolkit :: UI Widgets, defect)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mstriemer, Unassigned)

References

Details

(Whiteboard: [recomp])

Related to bug 1848365, we expect to have some common fluent attributes that widgets will set. It's kind of annoying to set data-l10n-attrs="heading, message" so it would be nice to have this be allowed by default to our moz- custom elements

We could potentially do this in MozLitElement's connectedCallback() but it might be nicer to do this in the Fluent code itself

It seems unclear which attributes are allowed for our HTML custom elements there. It looks like label and aria-label may only be allowed for XUL elements. These are also useful for our HTML custom elements and should be allowed by default

Allow attributes: label, aria-label, heading, message, description

Severity: -- → S3
Whiteboard: [fidefe-reusable-components] → [recomp]
See Also: → 1901336

Is this now a dupe of Bug 1901336? Or is this bug more concerned with the ergonomics when declaring/using our reusable components? For example in firefoxview.html where data-l10n-attrs is being explicitly declared:

 <moz-page-nav
      data-l10n-id="firefoxview-page-heading"
      data-l10n-attrs="heading"
    >
Flags: needinfo?(mstriemer)

Not quite a dupe but I think that solution makes having some safe-listed attributes irrelevant since it's so easy to do now

Closing as WONTFIX since I don't think we need to muddy the fluent code for this anymore

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(mstriemer)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.