-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.4.10 Reflow - CSS Pixel Definition / interpretation #162
Comments
as already suggested, I'd say scrap this part. the CSS pixel is not being used because of its visual size, but because it's the minimum stable unit of measure for web content (all other CSS units, even |
@patrickhlauke I don't think we're completely at liberty to do that, as WCAG2ICT is just supposed to provide "interpretation" not substantively change the requirement or definitions. |
Scrapping the "visual angle of about 0.0213 degrees" would not only change the core of the original CSS pixel definition, but it would throw away the only truly device and content independent definition of character size. It is only the angle that a character subtends at the eye that determines whether it is large enough to read (although things like poor contrast can reduce the legibility of an otherwise legible character). Visual angle-based definitions don't depend on factors such as viewing distance or whether that character is made up of multiple pixels or is printed on a piece of paper. Because visual angle is not the most practical thing to measure, WCAG SCs and their WCAG2ICT interpretations do need to introduce more tangible measures such as CSS pixel/device-independent pixel, but these should be expressed in a way that preserves as best as possible the underlying need to define things correctly in terms of visual angle. Ideally, the SCs and the definition should work equally well for the radically different scenarios of software that is rendering small characters on a watch display and software that is driving a large wall-mounted information display. We've focussed on mobile phone and PC display, but these are not the most challenging use cases. |
However, the SC can't make an actual physical size a requirement, when this is completely outside of the control of authors...
|
I think I finally found all of the pertinent definition discussion points from Issue #98 and included them in sections in the first part of this issue. If you think I missed something, please add in here. |
There are two directions we could go with this - stick with the WCAG CSS pixel definition and simply add notes to that effect or create a Device-independent pixel definition, include the formula to calculate the arc length of the viewing angle, provide a listing of devices and viewing distance ranges. For the "use the CSS pixels option", maybe the notes could be something like: Note 1: Non-web software and its accompanying platform software does not use measurements of CSS pixels. Therefore, platform-specific pixel density-independent measurements should be used. Examples include: px in iOS and MacOS, density-independent pixels (DP) for Android, and device-independent pixels for Windows. Note 2: Some non-web software cannot rely on device or density independent pixels as a substitute for CSS pixels because it resides on closed functionality products or is on a platform that has no equivalent concept. Such software should use the formula to calculate the arc-length of the viewing angle using the optimal viewing distance from the screen to calculate the reference pixel size. |
Factors such as screen size, resolution, and personal visual acuity can also influence the optimal viewing distance. Note that persons with low vision will often view displays at a much closer distance. The reference pixel length = Length of Arc = θ × (π/180) × d |
On a tangential note - Some of the challenges with optimal viewing distances is that they assume typical vision and thus when you are not in that typical range the screen may actually be harder to see because it is assumed that a person will not be viewing from other distances such as closer. I continue to recommend anytime we talk about viewing distance that we must have a note addressing the fact that this is not the distance that many people with low vision will be viewing it at. |
UI designers will typically use all of the figures that we have accumulated for deciding what character size to use to ensure that text is comfortably readable by someone with typical vision using their UI at the appropriate distance(s) for the intended class of product. As both @maryjom and @mraccess77 have pointed out, people with low vision will often need to use the product at radically shorter viewing distances to be able to read the text at all (sometimes even using a lupe with the product almost in contact with the face)! An additional complicating factor is that some classes of product, such as wall-mounted displays, will prevent users from adjusting the viewing distance at all. The focus of 1.4.10, and all other WCAG SCs, on content rather than how that content is presented makes it impossible to take such important practical considerations into account. |
These two notes are promising: #162 (comment) I suggest we discuss one note at a time, in context of the platforms that they pertain to. 2023-05-23 draft note 1 addresses 2023-05-23 draft note 2 addresses the following. This is the harder one in my opinion, please bring examples on specific platforms:
@mapluke, can you be more specific about which kinds of wall-mounted displays? If it's a PC attached to a projector, or a phone casting to a TV, then we can use the device-independent pixels defined for those platforms. A very different category of devices are like Section 508's "variable message signs." Are there other kinds we should be considering? Acknowledging that there are no bright lines today, and in the future technology will surely change again — can we reasonably expect evaluators to come up with an "assumed viewing distance" (WCAG's phrase)? Kind of like how 1.4.4 Resize Text never set a screen size... On the one hand it would have been convenient for evaluators to have a hard rule like "800 by 600". But on the other hand, technology changes. Today some test at 1024 width, others at 1280 width; it's chaos, but it's arguably better chaos than stuck at 640 or 800 width forever. |
I agree this would be a good note, but it should not change what we recommend for evaluating the success criteria. In fact, the smaller the "assumed viewing distance", the less stringent all of the criteria become... Thus forcing people with low vision to lean still further in, further reducing the "assumed viewing distance", a downward spiral. |
Reminder: In our 2023-05-11 call, we briefly considered pursuing an erratum for the WCAG definition of 'CSS pixel.' The idea was to mark a Note starting from "A CSS pixel is the canonical unit of measure..." down to the end of the paragraph. The result would be clarifying that the normative definition is just these words: "visual angle of about 0.0213 degrees". I wouldn't go to the effort of an erratum for no reason, but if it turns out necessary to make things work in WCAG2ICT then I'm all for it. |
My original comment 2023-05-25I found more sources for viewing distances on wearable, mobile, and TV platforms. I've derived viewing distances based on measurable information about pixels on the respective platforms. See attached: CSS_pixels_and_viewing_distances_WCAG2ICT.xlsx I found these details surprising yet believable:
TV platforms in particular will be a stress test for our WCAG2ICT notes. Update 2023-06-02I was wrong when I said a higher viewing distance is "stronger for accessibility." It's actually a mixture.
|
I have updated my note above to try to improve on the proposed note language and incorporated a couple of potential examples from @mitchellevan's comment:
|
Thanks all for the discussion. I've attempted to take this and use in proposing content for target size in issue #80 (comment) |
In response to #162 (comment) and #80 (comment) and yesterday's Task Force call, I propose the following more detailed WCAG2ICT notes for css pixel. Pasting again for context:
Adding for WCAG2ICT:
Summary of my additions:
|
With those two points, doesn't that essentially invalidate the entire SC, which relies on a precisely defined (for better or worse) measure? It just pulls the rug from under the SC's normative foundation, in effect... |
Nit: For iOS I think it should be 'pt' instead of 'px' Do we know if the DP/ DPI examples in these platforms are defined using the visual angle? |
Another nit: for Windows, it's "effective pixels" ( And no, I don't believe platforms define their units with direct reference to some visual angle, which makes the "specifies a visual-angle pixel for the platform" bit ... a bit dubious. For instance, take two different iPhones, one a "mini" or "SE" size, one a regular/pro one. despite having different physical/hardware pixel counts, they generally run at the same logical resolution...but their physical screen sizes are different, so an apple "point" has different physical dimensions (since both types of phones would be held at the same distance from the eye, in general)... In some cases, there may be an "implication" of the idea that the measures scale based on a particular visual angle (see for instance https://learn.microsoft.com/en-us/windows/apps/design/layout/screen-sizes-and-breakpoints-for-responsive-design#effective-pixels-and-scale-factor), but they don't actually say something like "which is why our epx represents X steradians" or other such obscure definitions. |
After the conversation in the 8 June meeting, we decided to have the notes proposed for 2.5.8 Target size be applied to the CSS pixel definition (though the platform-specific terms are still being verified by @ferBonnin for the Windows platform). I've also attempted to take in salient points from Mitchell's latest comment. NOTE 1: Non-web software and their accompanying platform software do not use measurements of CSS pixels. Therefore, platform-specific pixel density-independent measurements should be used. Examples include: pt for iOS and MacOS, density-independent pixels (DP) for Android, and device-independent pixels for Windows. NOTE 2: Non-web software that either doesn't have the concept of device or density independent pixels or measurements by pixels, should use the formula contained in the definition of a reference pixel to calculate the arc-length of the viewing angle using the optimal viewing distance from the screen to calculate the reference pixel size. Examples where device-independent pixels may not be defined in the platform include:
When there is no platform-defined device/density independent pixel measurement, the reference pixel size can be approximated in the following manner:
Note 3: People with low vision often use devices at less than the standard viewing distance. However, basing the visual-angle pixel on a midrange viewing distance provides a balance of benefits for users with disabilities. If a longer viewing distance were chosen as the basis for the visual-angle pixel, the viewport would be measured with a smaller number of larger pixels, causing Success Criterion 1.4.10 Reflow to be less stringent. If a shorter viewing distance were chosen, user interface components would be measured with a larger number of smaller pixels, causing the Target Size and Focus Appearance criteria to be less stringent. |
Here's a link to the WCAG 2.2 definition of CSS pixel CSS pixel
Guidance When Applying "CSS pixel" to Non-web Documents and SoftwareThis applies directly as written and as described in the WCAG 2.2 glossary. Note 1: Non-web software and its accompanying platform software do not use CSS pixel measurements. Therefore, platform-defined density-independent pixel measurements which approximate the CSS reference pixel should be used. Examples of platform-defined density-independent pixel measurements include: points (pt) in iOS and macOS, density-independent pixels (dp) for Android, and effective pixels (epx) for Windows. Note 2: Examples where a density-independent pixel may not be defined in the platform:
When there is no platform-defined density-independent pixel measurement, the reference pixel size can be approximated in the following manner: -Determine a viewing distance: The chosen viewing distance should align with the use case and display type. For instance, in the case of a touchscreen, the viewing distance should be less than the length of an arm, typically around 28 inches (71 cm). Note 3: Most software and devices are usable at more than one viewing distance. However, for a density-independent pixel to be considered an approximation for the reference pixel, the viewing distance of the visual-angle pixel must be plausible. For example, in software designed for use with a touchscreen, a visual-angle pixel longer than 0.11 inch (0.28 mm) would not be plausible, because this would signify a viewing distance of more than arm’s length. Note 4: People with low vision often use devices at less than the standard viewing distance. However, basing the device-independent pixel on a typical viewing distance provides a balance of benefits for users with disabilities. If a longer viewing distance were chosen as the basis for the device-independent pixel, the viewport would be measured with a smaller number of larger pixels, causing Success Criterion 1.4.10 Reflow to be less stringent. If a shorter viewing distance were chosen, user interface components would be measured with a larger number of smaller pixels, causing the 2.5.8 Target Size and 2.4.13 Focus Appearance criteria to be less stringent. |
Consensus from the meetings on 22 June (for Note 1) and 29 June (for the other notes) is as follows: Guidance When Applying "CSS pixel" to Non-web Documents and SoftwareThis applies directly as written and as described in the WCAG 2.2 glossary. Note 1: Non-web software and its accompanying platform software do not use CSS pixel measurements. Therefore, use platform-defined density-independent pixel measurements which approximate the CSS reference pixel. Examples of platform-defined density-independent pixel measurements include: points (pt) in iOS and macOS, density-independent pixels (dp) for Android, and effective pixels (epx) for Windows. Note 2: Examples where a density-independent pixel may not be defined in the platform:
When there is no platform-defined density-independent pixel measurement, the reference pixel size can be approximated in the following manner:
Note 3: Most software and devices are usable at more than one viewing distance. However, only viewing distances that are plausible for the product can be considered an appropriate approximation for the reference pixel. For example, in software designed for use with a touchscreen, a visual-angle pixel longer than 0.11 inch (0.28 mm) would not be plausible, because this would signify a viewing distance of more than arm’s length. Note 4: People with low vision often use devices at less than the standard viewing distance. However, basing the device-independent pixel on a typical viewing distance provides a balance of benefits for users with disabilities. If a longer viewing distance were chosen as the basis for the device-independent pixel, the viewport would be measured with a smaller number of larger pixels, causing Success Criterion 1.4.10 Reflow to be less stringent. If a shorter viewing distance were chosen, user interface components would be measured with a larger number of smaller pixels, causing the 2.5.8 Target Size and 2.4.13 Focus Appearance criteria to be less stringent. |
@maryjom do you want this on comments-by-guideline-and-success-criterion or within comments-on-definitions-in-wcag-2.2-glossary-in-appendix-a ? I will update per what you advise. Thanks for clarifying. |
@ChrisLoiselle This goes into the glossary section. Remember, don't include the original WCAG content, as it will be automatically included. Just the WCAG2ICT Guidance on applying "CSS Pixel" section and notes. |
Updating per #162 and resolutions made in meetings.
Closing this issue, as the content is merged into the editor's draft. |
To focus work on the Definition of CSS pixel as applied to non-web documentation and software, I have created this issue.
Where CSS pixels is used
"CSS pixels" is used in several places in WCAG 2.2:
Using Device-independent pixels vs. CSS pixels for non-web contexts
Current proposal for device-independent pixel definition
device independent pixel
visual angle of about 0.0213 degrees
Note: This unit is density-independent, and distinct from actual hardware pixels present in a display. The physical size of a device-independent pixel depends on the assumed viewing distance between the user and the display.
Example: In the case of a computer display, the assumed viewing distance is considered to be an arm's length, which is around 28 inches (71 cm). At that viewing distance, the size of a device-independent pixel is approximately 0.26 mm.
Comments on the topic of the CSS pixel definition from Issue #98
From Mitch on 18 April
Nit: Better to say "in the case of a mobile phone app"
My concerns for discussion:
MJM Note During the 20 April meeting, the poll indicated all wanted to use "device-independent pixel" with a note talking about how it relates to CSS pixel.
Patrick Lauke's (18 April comment)
note that these definitions don't necessarily match the reality of different physical screen dimensions between devices. they're an approximation/idealised measure at best (just like CSS pixels, which can vary wildly between different monitors/devices)
to take an example: pick up two different android (or even iOS) devices with differing screen sizes, and measure (with a physical ruler) the size of interface components defined in dps (or Apple "points"). they will vary. Definitions that try to pin things down to a definitive size as measured on screen will almost certainly only be idealised/not correct.
Sam Ogami (19 April comment)
Some systems don’t have idea of pixel size, not changeable by author. This is a case where web requirement is not reverent and should not be applied. There are already other requirements for text size outside of WCAG2ICT. In addition to adding note 3 from MJ comment into this SC the closed products section a general note about pixels should be added as it CSS pixels or device independent pixels are in other SC also.
Jon Avila (4 May comment) & Mary Jo's response to this specific comment
Jon: While the definition is appropriate I can't help but wonder given that this SC is aimed at users with low vision that we should at least acknowledge somewhere that people with low vision would likely not be using the device at such a viewing distance. but that this is the standard viewing distance.
Mary Jo: I think that is true for web content as well - not just the application of WCAG to non-web ICT. If it is generally true for all tech, any statement to that effect should go into WCAG. WCAG's definition is based on the CSS reference pixel and that is how it is defined.
Mary Jo (10 May comment) posted some css reference pixel size calculations
See comment regarding calculated pixel size. However, as Patrick pointed out, the calculation was incorrect and would still misrepresent the sizes as viewed on different displays for different software platforms. Additionally, in the 11 May meeting it was pointed out the arc length calculation should be used - not the law of sines. Sam also mentioned that the formula should be included with the definition, since not all closed functionality products have any software ruler for pixel measurements and not all platforms have the concept of CSS pixels.
Paraphrased Patrick's comment response:
Jon Avila (10 May comment)
There is software such as pixel rules for Windows, Mac, and Android that could be used with non-web software and non-web documents - obviously for hardware it would be difficult to measure that precisely though as software isn't an option.
Mary Jo's response: Some software doesn't reside on top of a software platform (e.g. in closed functionality software), so there likely isn't a device-independent pixel defined, and likely no measuring tools to help. In the case of 1.4.10 Reflow, I'm not sure how a software author would make the appropriate measurements and calculations to ensure is met. In many cases, closed functionality software doesn't have the capability of increasing content size to 400% or maybe not at all.
Mary Jo (10 May comment) potential change to the device-independent pixel definition
Maybe we simply use the definition of #98 (comment) (above) and state that a device-independent pixel's size is dependent on the software platform's definition. In Android, it is called a "density-independent pixel (DP)" and in Windows it is called "device-independent pixel". I don't know if a DIP in those platforms is actually defined based on the viewing angle (I haven't found documentation about what it is based on.)
Patrick's response:
EDIT: found Android article on supporting different pixel densities and I think this part is relevant here:
Taking "one pixel on a medium-density screen" to (very handwavily) mean "one CSS pixel" (because that, roughly, matches reality - and keep in mind that on mobile/tablet, they don't have to deal with things like users changing the OS resolution etc), this shakes out nicely to basically saying that on android, read the SC to mean "320 dp / 256 dp" effectively).
Detlev (12 May comment) suggests using "nearest equivalent"
If adaptation to a portrait orientation is tested at all, it seems reasonable to adapt to existing, i.e. available, sizes, e.g., by adding a note that the reference to 320 px should be extended to "320 px or its nearest available equivalent" (if we can't have "up to").
Bruce and Mitch responded in support of this approach and Mitch gave an example in MacOS that you can't get down to a viewport of 320 CSS pixels.
The text was updated successfully, but these errors were encountered: