w3c / w3c/clreq

q element produces incorrect quotation marks when language changes

Open
#240 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc:clreq gap i:quotations l:zh p:advanced s:hani
Dominant language
HTML
Stars
809
Forks
66
Avg merge
19m
Merged PRs (30d)
1

Description

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

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:

第一 「second 『third』」

However, if lang="en" is added to the q tag, the result becomes:

第一 “second ‘third’”

Here is a test. There are also tests and results in the i18n test suite.

For more details, see this GitHub issue, which is being used to track this gap.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked exploratory test and the i18n test suite results for q-element nesting, then read the referenced w3c/eurlreq issue for the tracked gap. Compare the two language scenarios and determine what requirement or browser behavior needs to be clarified; done means the expected quotation-mark behavior is documented unambiguously.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
internationalization
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.