Skip to content

Commit 24a9bcd

Browse files
giacomo-petriJym77WilcoFierspatrickhlauke
authored
Clarified and included CJK requirements in large text definition and updated rules affected by this change (act-rules#2121)
* Update large-scale-text definition to include CJK languages with different requirements * updated rule slightly updated to reflect considerations about halfwidth and fullwidth differences * added unicode reference added unicode references * polishing definition * adding spaces * spaces * improving understandability * added bold for consistency * polishing the definition * adding passed and failed examples * fixes * cjk * fixes * add lang="ja" for Japanese examples in min contrast rule * add lang="ja" for Japanese sentences in contrast enhanced * accepted Wilco suggestion with few edits * Update large-scale-text.md * added words to dictionary * Update spelling-ignore.yml * Update large-scale-text.md * typo * Update spelling-ignore.yml * Apply suggestions from code review Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com> * official to unofficial * Update large-scale-text.md * Update large-scale-text.md * replaced Japanese with Chinese * replaced Japanese with Chinese example * Update __tests__/spelling-ignore.yml * Update spelling.js * Update pages/glossary/large-scale-text.md Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk> * Update large-scale-text.md roll back to the original definition + note for CJK languages * Update text-contrast-afw4f7.md removed irrelevant failing examples (as there's no longer a distinction between CJK and Latin characters) and eliminated one passing example within the CJK range that was no longer pertinent based on the updated definition of large text * Update text-contrast-enhanced-09o5cg.md * Update text-contrast-afw4f7.md * Update large-scale-text.md * Update spelling-ignore.yml * Apply suggestions from code review Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com> * Update large-scale-text.md * Update pages/glossary/large-scale-text.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com> --------- Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com> Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com> Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
1 parent 413e317 commit 24a9bcd

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

__tests__/spelling-ignore.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
# Notes and acronyms
127127
- TODO
128128
- TBD
129+
- CJK
129130

130131
# Tool and library names
131132
- axe-core
@@ -244,6 +245,9 @@
244245
- 000B
245246
- 000C
246247
- 000D
248+
- 4E00
249+
- 9FFF
250+
- 4E00–9FFF
247251

248252
# JSON attributes/ metadata/ methods
249253
- testcases

__tests__/spelling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function getCuratedMarkdownBody(body, options = {}) {
109109
* @returns {String[]}
110110
*/
111111
function getSpellIgnored() {
112-
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'))
112+
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {schema: yaml.FAILSAFE_SCHEMA}) //added schema due to entries starting with a non-zero digit
113113

114114
/*
115115
Building spelling exception in the shape FOOxxx where xxx is a number.

pages/glossary/large-scale-text.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@ input_aspects:
88
- DOM tree
99
---
1010

11-
Text nodes with a [computed](https://www.w3.org/TR/css-cascade-3/#computed-value) [font-size](https://www.w3.org/TR/css-fonts-3/#propdef-font-size) of:
11+
A text node is large scale text if at least one of the following is true:
1212

13-
- at least 18 [points](https://www.w3.org/TR/css-values/#pt), or
14-
- at least 14 [points](https://www.w3.org/TR/css-values/#pt) and a [computed](https://www.w3.org/TR/css-cascade-3/#computed-value) [font weight](https://www.w3.org/TR/css-fonts-3/#font-weight-prop) CSS property of 700 or higher.
13+
- the text node [computed][] [font-size][] is at least 18 [points][], or
14+
- the text node [computed][] [font-size][] is at least 14 [points][] and has a [computed][] [font weight][] of 700 or higher.
15+
16+
17+
#### Background
18+
In the domain of languages such as Chinese, Japanese, and Korean (CJK languages), encompassing the Unicode character range from 4E00 to 9FFF ([CJK Unified Ideographs](https://unicode.org/charts/PDF/U4E00.pdf)), it becomes crucial to acknowledge the intricate nuances in their typographic requirements. Despite sharing a common Unicode spectrum, each CJK language and its corresponding country may exhibit distinct typographic preferences and standards.
19+
20+
Particularly noteworthy is the lack of uniformity in defining text sizes as either large or small within the following ranges:
21+
- from 18 [points][] to 22 [points][]
22+
- from 14 [points][] to 18 [points][] with a [computed][] [font weight][] of 700 or higher.
23+
24+
Whether CJK characters in these ranges should be considered as "large scale" depends on the language of the text, as well as the country for which the text is designed and whose requirements must be followed. Given that these pieces of information are not readily available, the ACT rules adhere to the large text definition outlined above. This definition is applicable across all languages under the rationale of "no false positives."
25+
26+
27+
[computed]: https://www.w3.org/TR/css-cascade-3/#computed-value
28+
[font-size]: https://www.w3.org/TR/css-fonts-3/#propdef-font-size
29+
[points]: https://www.w3.org/TR/css-values/#pt
30+
[font weight]: https://www.w3.org/TR/css-fonts-3/#font-weight-prop

0 commit comments

Comments
 (0)