[Webkit-unassigned] [Bug 235591] New: q element produces incorrect quotation marks when language changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 25 08:28:15 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=235591

            Bug ID: 235591
           Summary: q element produces incorrect quotation marks when
                    language changes
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ishida at w3.org
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

This issue is common across all languages that use the q element.

When an English page contains a quotation in another language, the quotation marks used around that quotation (and inside it for embedded quotes) should be the English ones – not those of the language of the quotation. The same applies for other languages.

Currently, if the language of the quotation is declared on the q tag in HTML and that tag has a lang attribute, browsers instead set the quotation marks based on the language of the quote.

Quotations work fine in a sentence that is all in the same language. For example, the markup for this Georgian text:

<span lang="ka">ერთი <q>ორი <q>სამი</q></q></span>

will result in:

ერთი „ორი «სამი»“

However, if the quote is in English and lang="en" is added to the first q tag, the result becomes:

ერთი “two ‘three’”

whereas it should be:

ერთი „two «three»“




Specs:
This incorrect behaviour was initially dictated by the HTML specification. issue 3636 (https://github.com/whatwg/html/issues/3636#issuecomment-384340053) was raised to change the spec. In the end the entire section was removed from the HTML spec, and HTML now relies on CSS for this behaviour.

css-content (https://drafts.csswg.org/css-content/#quotes-property) says that "If a quotation is in a different language than the surrounding text, it is customary to quote the text with the quote marks of the language of the surrounding text, not the language of the quotation itself.", however it is non-normative text.

Issue 5478 (https://github.com/w3c/csswg-drafts/issues/5478), requests that this be made normative, and has been agreed by the CSS WG.


Tests & results:
Interactive test, When an embedded quote is in a different language, the quotation marks should be those of the main body, even if the language of the quote is declared using a lang attribute.
https://github.com/w3c/character_phrase_tests/issues/4
Gecko: ❌ If a lang attribute is used, the quotation marks are those associated with the quotation rather than those associated with the surrounding text. Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0
Blink: ❌ Same. Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Webkit: ❌ Same. Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15

i18n test suite, Multilingual nesting.
https://w3c.github.io/i18n-tests/results/the-q-element.html#ml_nesting




Expected results:

Please use the quote marks of the main paragraph text, rather than change the quote marks to match the embedded quotation.

(This issue is being tracked at https://www.w3.org/TR/geor-gap/#issue22_quotations)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220125/d3891036/attachment.htm>


More information about the webkit-unassigned mailing list