Skip to content

isBooleanAttr for the HTML attribute 'translate' #11391

Closed
@EtienneBruines

Description

Version

2.6.11

Reproduction link

https://jsfiddle.net/hgaL8t5n/

Steps to reproduce

Use translate=no in a template

What is expected?

template=no to be rendered in the HTML

What is actually happening?

translate=translate is being rendered instead

You can use devtools to inspect the rendered HTML in the reproducible JSFiddle example.


There is a isBooleanAttr-variable somewhere in the Vue code which marks translate as a boolean, probably to be used like the disabled attribute works.

This is incorrect for two reasons:

  1. "translate" is not a valid value for the attribute (only "", "yes" and "no" are valid). See the spec: https://html.spec.whatwg.org/multipage/dom.html#attr-translate
  2. this translate-attribute is mostly used to indicate not to translate it, so when specifying "no", people actually mean "no"

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