This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19887 - add a "script" or "writing-system" attribute, in addition to "lang"
Summary: add a "script" or "writing-system" attribute, in addition to "lang"
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 07:57 UTC by Amir E. Aharoni
Modified: 2015-06-26 05:38 UTC (History)
4 users (show)

See Also:


Attachments

Description Amir E. Aharoni 2012-11-07 07:57:11 UTC
In HTML it's possible to define lang and dir for every element. It would also be useful to define the writing system of an element.

The default value for this attribute can be obtained from BCP 47 or CLDR.

Here are several possible use cases:

1. Fine-grained definition of the writing system element in languages that can be written in several languages. Serbian, for example, can be written in Latin and in Cyrillic. It's possible to use lang="sr-latn" and lang="sr-cyrl", but this is not robust enough, because the langauge codes can have other qualifiers after the dash, such as locale (country), dialect, variant, etc.

2. Using CSS pseudo-selectors to apply a styling rule to all elements in different languages, but the same writing system. For example, a site may have content in English, Arabic, Persian, Urdu and other languages in the Arabic script, and its designer may want to apply a default font to all the content in the Arabic-script languages. It can be done using :lang(ar), :lang(fa), :lang(ur) etc., but this doesn't scale, because there dozens of other languages written in the Arabic script. So, I envision something like :script(arab) to cover all of them. This can be used for applying fonts, line-height, and any other styling.
Comment 1 Amir E. Aharoni 2012-11-07 12:52:50 UTC
... In case it wasn't clear, the value should be an ISO 15924 code.
Comment 2 Robin Berjon 2013-01-21 15:58:56 UTC
Mass move to "HTML WG"
Comment 3 Robin Berjon 2013-01-21 16:01:43 UTC
Mass move to "HTML WG"
Comment 4 Michael[tm] Smith 2015-06-16 12:07:30 UTC
Can already be handled by CSS variables and BCP47. No implementer interest in doing anything more for this, nor any indications of much webdev interest.