isBooleanAttr for the HTML attribute 'translate'
See original GitHub issueVersion
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:
- “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
- this translate-attribute is mostly used to indicate not to translate it, so when specifying “no”, people actually mean “no”
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
translate - HTML: HyperText Markup Language | MDN
The translate global attribute is an enumerated attribute that is used to specify whether an element's translatable attribute values and its ...
Read more >Using HTML's translate attribute - W3C
HTML5 has a list of attributes that are to be translated by default, but these attributes should not be translated if they are...
Read more >HTML Global translate Attribute - W3Schools
The translate attribute specifies whether the content of an element should be translated or not.
Read more >What is the translate attribute in HTML? - Educative.io
In HTML, the translate attribute is used to identify whether the text content of an element can be translated to another language or...
Read more >How to enable HTML attribute translation?
In modern web applications it is common to use custom HTML attributes like data-* which later can get parsed by Javascript. By default...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe we should just remove it from the list. I don’t know the reason it was initially added
Hello-word