[clreq] q element produces incorrect quotation marks when language changes (#240)

r12a has just created a new issue for https://github.com/w3c/clreq:

== q element produces incorrect quotation marks when language changes ==
When a Chinese page contains a quotation in another language, the quotation marks used around that quotation (and inside it for embedded quotes) should be the Chinese ones – not those of the language of the quotation.

Currently, if the language of the quotation is declared on the `q` tag in HTML using the `lang` attribute, browsers instead set the quotation marks based on the language of the quote.

For example, if English text is quoted in a Chinese sentence surrounded by just `<q>`, the quotation marks will be correct:

<span lang=“ka”>第一 「second 『third』」</span>

However, if `lang=“en”` is added to the `q` tag, the result becomes:

<span lang=“el”>第一  “second ‘third’”</span>

Here is <a href="https://w3c.github.io/i18n-tests/exploratory/vanilla/?text=%3Cdiv%3E%E7%AC%AC%E4%B8%80%20%3Cq%3Esecond%20%3Cq%3Ethird%3C%2Fq%3E%3C%2Fq%3E%3C%2Fdiv%3E%0A%3Cdiv%3E%E7%AC%AC%E4%B8%80%20%3Cq%20lang%3D%22en%22%3Esecond%20%3Cq%3Ethird%3C%2Fq%3E%3C%2Fq%3E%3C%2Fdiv%3E%0A&lang=zh-hant&fontSize=45&width=560&height=159">a test</a>.    There are also tests and results [in the i18n test suite](https://w3c.github.io/i18n-tests/results/the-q-element.html#ml_nesting).

This incorrect behaviour is currently dictated by the HTML specification, so <a href="https://github.com/whatwg/html/issues/3636#issuecomment-384340053">an issue</a> has been raised to change the spec.

Marking as advanced priority, because use of the q element is optional (quote characters can be used instead), and it can be styled using CSS for the general case.

Please view or discuss this issue at https://github.com/w3c/clreq/issues/240 using your GitHub account

Received on Tuesday, 4 February 2020 12:01:14 UTC