w3c / wcag3

WCAG 3
https://w3c.github.io/wcag3/
Other
37 stars 7 forks source link

Create Structured Content guideline #19

Open WilcoFiers opened 10 months ago

WilcoFiers commented 10 months ago

Previous issues: w3c/silver#260, w3c/silver#329, w3c/silver#330

Previous work: https://www.w3.org/WAI/GL/WCAG3/2020/outcomes/uses-visually-distinct-headings

Open questions

  1. How should it be decided whether headings are sufficiently distinct, from each other and from other content? Can this be done using color contrast? Should the distance from which a heading can be read be factored into this?

  2. Be sure to differentiate between "font" and "typeface". Helvetica 12pt bold is a different font from Helvetica italic 14px, but has the same typeface.

  3. Ensuring sufficient semantics on headings may be more impactful or important than ensuring headings are visually distinct. Maybe the requirement for visual presentation could be focused on changing presentation away from the default.

GreggVan commented 10 months ago

gregg


Gregg Vanderheiden @.***

On Sep 6, 2023, at 4:10 AM, Wilco Fiers @.***> wrote:

Previous issues: w3c/silver#260 https://github.com/w3c/silver/issues/260, w3c/silver#329 https://github.com/w3c/silver/issues/329, w3c/silver#330 https://github.com/w3c/silver/issues/330 Previous work: https://www.w3.org/WAI/GL/WCAG3/2020/outcomes/uses-visually-distinct-headings

Open questions

How should it be decided whether headings are sufficiently distinct, from each other and from other content? Can this be done using color contrast? Should the distance from which a heading can be read be factored into this?

Do we have a requirement for this? This seems to go beyond accessibility. If they are not distinct for anyone — then is it an accessibility question?

Be sure to differentiate between "font" and "typeface". Helvetica 12pt bold is a different font from Helvetica italic 14px, but has the same typeface.

As long as things are programmatically different

Ensuring sufficient semantics on headings may be more impactful or important than ensuring headings are visually distinct. Maybe the requirement for visual presentation could be focused on changing presentation away from the default.

What do you mean by "sufficient semantics" I translate this as "sufficient meaning" but not sure that is an accessibility issue. We can’t require that authors that make meanless headers rewrite them to be meaningful… (I don’t think)

Did you mean something different?

— Reply to this email directly, view it on GitHub https://github.com/w3c/wcag3/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNGDXS2NJTWM3CQH3O5MSDXZBK3TANCNFSM6AAAAAA4NE7VOQ. You are receiving this because you are subscribed to this thread.

Myndex commented 7 months ago

Content structure for a good visual hierarchy is definately an accessiblity issue (coga, among others). It is also a contrast issue. White space between lines and letters affects contrast perception, as does font weight.

The primary driver of contrast is the spatial characteristics. The amount of padding around text blocks, or around a heading, plays a part. It is mainly critical for blocks of body text.

In the image below on the left and the right the stroke wits and want sizes are identical on the left 3:1 on the way to 7:1. Certainly the seven to one is darker but notice that the major change in contrast appearance is related to the weight or thickness of the line. And the balance of line thickness is white space.

New size and weight examples 3:1 and 7:1 side 72ppi

Myndex commented 7 months ago

Also, in the contrast thread #10, there's a post that lists the SCs that belong with lightness contrast, and the SCs that go together with use of color.

Useful to remember that color as in hue/saturation is processed in the human vision system separately from lightness/darkness (luminance). And all find detail is in that luminance which is why luminance is critical for reading.

Therefore it is sensible to group the SCs that are about hue/sat, separate from those about luminance.

u9000-Nine commented 7 months ago
  1. How should it be decided whether headings are sufficiently distinct, from each other and from other content? Can this be done using color contrast? Should the distance from which a heading can be read be factored into this?

I think we need to look into what methods are currently being used which are sufficiently distinct so that we don't accidentally remove one. It's also important to consider combinations of different distinctions.


Some distinctions I encounter or think about often:

Myndex commented 7 months ago

Hi @u9000-Nine

Some dictions I encounter or think about often:

Yes, good. I think these divide into three categories.

Headings

u9000-Nine commented 7 months ago

Hi @u9000-Nine

Hi @Myndex 🙂

Some distinctions I encounter or think about often:

Yes, good. I think these divide into three categories.

  • Color/lightness contrast
  • Spatial style/whitespace (directly affects contrast)
  • Non-text indicators (additionally guides visual hierarchy)

I like the idea of breaking these out, but I think it needs slightly more categories than you have. What do you think about the following?

Headings

Spatial distinctions

Visual text attributes (better name needed) distinctions

Content distinctions

External indicators

Myndex commented 7 months ago

Hi DJ Chase @u9000-Nine Sorry for the delay in response.

Note: my "drinking from a firehose prolixity" is part of my process in working through ideas. I've hidden most of the backwork under "Click for details".

Weight is spatial

Visual text attributes (better name needed) distinctions

  • Font-weight

IMO font Weight is the primary, most critical "spatial quality" because it directly defines the spatial frequency which directly affects contrast sensitivity, which ultimately determines the perception of contrast, and with that, readability.

Click to enlarge:

New contrast sensitivity Graph 5 new leads NOT APCA all same

In the graph above, all the sample text is in the same color, but the different weights indicating the approximate placement on the human contrast sensitivity curve for a practical demonstration of the abstract science.

Most other font attributes are also spatial in nature, at least in part, but not always as critical to that definition.

User Needs Summary

If we think about this from the user-need perspective, the four related core user needs for text/readability/structure accommodations are:

CLICK (open/close) Detailed User Needs Summary ⇩ ⇩ ⇩ ⇩ ⇩ ### Acuity Impairments - **Visual Acuity** _(directly impacted or assisted by font size)_ - The **critical font size is 2x to 2.5x the _acuity_ size** for a given user, provided it is at or above the critical contrast level. - The desired outcome is that users can set the smallest content font to their individual critical size, and that larger fonts maintain a larger appearance but do not get "too big", as fonts too large negatively impact readability. ### Contrast Impairments - **Contrast Sensitivity** _(directly impacted by contrast determining features)_ - Font **weight**, and non-text line **thickness**, are the **primary** determining factors for **perceived contrast** for strokes less than about 4px thick. - The **critical font weight** is directly **interrelated** with the **critical lightness contrast**. - The critical contrast _reserve_ depends on the intended **use-case** and desired readability level of the text (best fluent, high fluent, sub-fluent, non-fluent (spot).) - The preferred contrast reserve, such as for article body text, is **20 times** the JND **threshold** for the given user. - Lower levels such as 10x for fluent, 6x for sub-fluent, and 3x for non-fluent (spot) are also detailed in the corpus of research (Lovie-Kitchin et alia). - Font size **only applies** to contrast to the degree it **affects the rendered font weight/stroke thickness**. - White space, including letters and line spacing, directly affects contrast perception. ### Color Impairments - **Color Insensitivity (colorblind)** _(minimal reading impact, other than **red on black**)_ - The one lightness contrast concern is saturated colors with substantial red. - Reds should always be the darkest of a color pair. - I.e. saturated reds, oranges, or purples should generally not be paired with black or dark. - The reds on black prohibition is especially critical for those with protanopia and achromatopsia. - That said, the **low luminance** of saturated reds makes the red on black restriction the **_preferred practice for all users_**. - Also no saturated deep blues on black (for **all** users, regardless). - The _actually color blind_ achromatopes also need **AT** due to co-morbid low vision and photophobia. ### Coga and Language - Cognitive & Lexical _(directly impacted by layout/visual hierarchy, use of colors, and more)_ - The visual hierarchy guides the user through the intended content, using visual contrasts. - font weight (and line thicknesses) primary contrast impact - white space for grouping (padding, paragraph & heading spacing) - Also direct impact on visual contrasts. - font size, font family, style - Tangential effect on contrast due to how these affect rendered weight. - white space for contrast (letter, word, & line spacing) - use of lightness contrast to aide the visual hierarchy - secondary to maintaining readability for the use-case - color (hue/saturation) to aide the visual flow/grouping - Use of color (hue/saturation) and text decoration - some users need muted, non-distracting colors overall - some users need brighter, vibrant colors for a task - multiple schemes available to user; automated schemes - Containers - size relative to viewport size - scroll inhibition - text reflow - functionality preservation - Use of motion, state indication, non-motion animation, haptics, other feedback mechanisms. - Persistent user preferences, especially when - Interactive elements - use of color or marking with decoration (such as underlines) - grouping by use, kind, purpose, etc. - inline links consider trade-offs for readability vs link identification - use-cases for priorities: block text readability is critical, in a reference block or nav, links are more critical. ⇧ ⇧ ⇧ ⇧ ⇧ _END Detailed User Needs Summary_

CLICK (open/close) Connect User Needs to Design Elements ⇩ ⇩ ⇩ ⇩ ⇩ For the four core readability needs, _acuity, contrast, color, coga,_ we find that: 1. **Font-weight:** primary **_spatial_** contributor to visual contrast. 2. **Lightness contrast (achromatic luminance):** primary **_non spatial_** contributor to visual contrast. 3. **Font-size, -family, -style:** these properties are more spatial than not. a) _BUT_ for the most part they contribute to visual contrast only **to the degree** that these properties **affect the final rasterized stroke weight**. b) these properties are effective tools for the structure of the visual hierarchy. 4. **White space:** Spatial, affects cognitive needs a bit more than visual contrast. a) adequate padding helps contrast and helps grouping for the visual hierarchy. b) adequate letter and line spacing helps contrast and helps readability c) user preference to increase letter/line spacing can help dyslexia. 5. **Color (Hue/Sat):** color is functional at the lowest spatial frequencies. a) color is _NOT_ a contributor to _readability_ contrast b) improper use of color can result in blocking conditions for some users c) color can cause blocking of readability in certain edge cases. d) color can be very helpful for visual hierarchy, grouping, and other cognitive needs. e) but color should not be the only way to arrange and define the visual structure, nor convey information. ### Color should _expand_ not _explain_ - Acuity - #3a with modest help from #1 & #2 (maintain critical contrast) - Contrast - #1, #2, #4ab, with help from #3a (font metrics that contribute to contrast) - Colorblind - #5bce (Some algorithms help #5bc by adding protan compensation) - Coga - #4abc #5bcde with help from #1, #2, #3b ⇧ ⇧ ⇧ ⇧ ⇧ _END Connect User Needs to Design Elements_

Distinguishing Texts in the Hierarchy

Taking another stab at this, I'd class weight/stroke width and all whitespace as spatial. For font-size, there are arguments for spatial or font characteristics. Because font-size is (should be) universally adjustable by the user, setting size under font layout makes sense, particularly considering reflow.

Content Structure Groups

For Headings, Body-Blocks, Nav, Main Content (proposed)

Spatial - Contrast

Font - Layout

Content - Language-based Structures

Non-text - Decoration/Indication

I think it's best to group by

For instance, luminance is achromatic (disregards hue) and is processed by the human vision system separately from color (hue/saturation). Luminance (lightness) serves different functions from color (hue/sat) including cognitive, language, object recognition, motion, etc.

CLICK (open/close) Grouping by Process/Function ⇩ ⇩ ⇩ ⇩ ⇩ ## Stimulus Processing and Impairments It is reasonable to divide design aspects according to how processed, and their role in cognition, etc. - **Luminance** related - lightness/darkness/brightness perceptions are processed from luminance - luminance has our highest spatial resolution, but is weak for tasks of differentiation, with a single axis from dark to light. - i.e. it's hard to tell one gray from another unless they are adjacent. - luminance holds all the fine _spatial_ details, i.e. edge detection, textures, contrasts. - luminance holds text: letters ➣ visual word form area ➣ language processing - **Color** (hue saturation) related - Standard vision detects four unique colors (red yellow green blue), and all other colors are perceptions processed from these. - Color has very low resolution (spatially) less than a third to a fifth of luminance, but standard color vision excels in differentiation with two axes, a red/green and a yellow/blue. - Color holds most of the differentiating information (ripe vs unripe oranges) and is used in onject recognition and motion, but is _not_ usually part of language processing, nor fine details. ### Key impairments - Acuity deficit impairs fine details and luminance resolution due to "out of focus". - Making text _larger_ helps bring them to a point they can be focused. - Contrast deficit impairs the ability to distinguish lightness changes, like edges or faint details. - Making text bolder, or making the lightness contrast higher helps. - Color deficit impairs the ability to distinguish between colorful objects. - Ensuring that other identifiers are used to indicate the information presented in color is what helps here. - Cognitive and neurological deficits impairs the ability to break down and understand structures or meaning from content, or to navigate content, or to be distracted by chaotic or "busy" content, or to become overwhelmed by complicated tasks with content, or to read content clearly (i.e. dyslexia). - Ensuring that content follows a clear hierarchy, and that the user has adjustable personalizations for properties such as letter spacing, is among the ways to help here. ### _Summary of this post's concepts_ 1) Standard color vision has three axes total for decoding light and color (one luminance and two color) 2) Color insensitivities can reduce this to two (one luminance and one color axis) - or even a single axis (luminance only) in rare cases. - Some of these reductions include a significant loss of visible red. 3) Acuity and contrast deficits impact the ability to focus on or see detailed information. 4) Cognitive & neurological impairments can be triggered or confused or overwhelmed by content that is disorganized, busy, chaotically colorful, lacking color, overstimulating, under-stimulating, etc. - Clear hierarchies, using color to _augment_ organizational structures, providing alternate schemes and layouts a user can select, are helpful here. ⇧ ⇧ ⇧ ⇧ ⇧ _END Grouping by Process/Function_

Footnotes to "Font - Layout"
¹ Small caps and all caps are only for mixed case (bicameral scripts), and probably fits better under content. ² Writing system and text orientation could fit under font or content, possibly better with content. ³ Text decoration, such as underline, fits best under non-text, which is also probably best for link indication, but other decoration such as text-shadow or outline-text is probably better as part of font characteristics.

u9000-Nine commented 7 months ago

Sorry for the delay in response.

No worries @Myndex; we're doing this asynchronously. Thank you for putting such thought into your response!

Weight being spatial

I'm fine with this. By "spatial" I was talking about layout, but I'm all for changing the names for consistency. I also like the category names you chose -- they're very clear.

New groups

I generally agree with your changes. This is, again, very well thought out.

Font size

By "font size should always be user-adjustable", do you mean that we shouldn't allow font size as a distinction? I'm perfectly fine with not allowing absolute font size as a distinction, but I think a heading being larger than the body text (however big that is) is valid.

Text decoration

Why is text decoration in both Layout and Nontext?

Writing system

² Writing system and text orientation could fit under font or content, possibly better with content.

I strongly believe that writing system should be in content (or both). When I write in sitelen pona, for example, I can use different semantics and nuances than I can when writing in Latin or speaking.

Color

I'm perfectly fine with not counting color as a distinction. I noted it because it's something I see often (it's the default in Word), but it does definitely create issues with colorblindness.

Myndex commented 7 months ago

Hi DJ Chase @u9000-Nine

Weight...spatial
I'm fine with this. By "spatial" I was talking about layout....

You might find Accessible Contrast Easy Intro interesting. I have tried to find a better plain language term for "spatial", I'm certainly open to thoughts. Yes it is about layout, but also contrast....

CLICK for a small list of definitions ▼ ▼ ▼ ▼ ▼ - _Minimal Definitions_ - **Spatial or spatially:** relating to size, weight, or line thickness. - This includes how spacing, padding, and nearby elements affect the _local_ perception. - **Contrast:** the _perception_ of the difference between two of more things. - **_Spatial_** contrasts are contrasts relating to the differences in size or space _themselves_. - Color and **_lightness contrasts_** _emerge_ from the spatial characteristics _moreso than the color or lightness difference._ - In other words, for elements thinner than 4px-6px or so, our contrast sensitivity plummets rapidly as it gets smaller/thinner, and therefore smaller items require a greater perceptual distance between lightness/darkness. - **Luminance:** a physical measure of light, disregarding hue. - **Lightness:** (and darkness and brightness) are a human _perception_ of a given luminance intensity in a given context. - Color: is hue and saturation, and is processed by our vision & brain **_separately_** from lightness/darkness. - **Hue:** the uniqueness of a given color vs other colors, i.e. blue vs red. - **Chroma/saturation:** the intensity or purity of a color vs no color. ▲ ▲ ▲ ▲ ▲

Groups
I also like the category names you chose... well thought out.

Thank you, some of this emerges from the contrast research we've been doing, most particularly things like size and weight.

Font size
By "font size ... user-adjustable", do you mean that we shouldn't allow font size as a distinction?.

Oh no not at all, it is an important way to distinguish.

I think a heading being larger than the body text... is valid

Ah, yes yes font size is, and should definitely be, a distinguishing feature.

What I meant was, users adjusting fonts is to be considered, such as to how containers and "overflow" is handled. Ideally users should be able to scale the smallest body text up to around 80px to 92px (by font size), that means an x-height of about 42px. This is a zoom of 450% to 500%.

We want users to be able to zoom up the smallest text by 500%, but text that is already larger should zoom a smaller percentage.

See this experimental page of text zooms, and you'll notice that 500% is non-tenable for a cell phone, so device characteristics need media queries and consideration.

The tech for proportional text zoom is not yet in all browsers, but it is in Android now.

And while users can adjust text size, there are still reasonable size minimums depending on use case.

Relative font size is important for the visual hierarchy, and importantly, increasing font size results in the stroke being thicker, which increases visual (darkness/lightness) contrast.

RELATED: this page of size experiments demonstrates the futility of the CSS font-size metric. Font-size and weight is not absolute and massively varies between families.


Text decoration

Why is text decoration in both Layout and Nontext?

Open to discussion IMO... there are reasons it can be either place.

If it indicates functionality (underlined link) then leaning toward non-text. If it's just divisional, then leaning toward layout.

Writing system Writing system & text orientation could fit under font or content...

I strongly believe that writing system should be in content (or both). When I write in sitelen pona, for example, I can use different semantics...

Sensible, we've been discussing with some typographers in Asia regarding asian writing systems, particularly Japanese as it uses a combination of kana and kanji. So a single-case alphabet, and also logographic symbols, all intermingled. kanji is about twice as detailed and twice the spatial frequency, yet traditionally, they size both to an equal vertical height.


Color

I'm perfectly fine with not counting color as a distinction.....

Color is definitely a useful and important distinguishing element, and if I made it seem otherwise, that was an error.

It's just that color (hue/saturation, and not including luminance or lightness) shouldn't be the only distinguisher, if the color is meaningful. There is massive variation in how people perceive color, even among standard vision. And then context is results in even further unexpected results.

See this image: note in particular the yellow dots and the gray square each one sits on.

checker shadow yellow dot page42image3622584832

Both yellow dots are the exact same CSS color value. And both gray squares the dots are on are also identical to each other. The dot in the shadow looks like it's glowing due to perceptual context, not absolute by any means.

Color PLUS font-weight/size/family is good. It is still important to maintain lightness contrasts for readability.

So use color, YES, but as an accompaniment, not as the solo violinist.