act-rules / act-rules.github.io

Accessibility conformance testing rules for HTML
https://act-rules.github.io/
Other
131 stars 67 forks source link

"translations into a ..." links are pointing to the wrong URL - Meta viewport allows for zoom (proposed) - b4f0c3 #2170

Open giacomo-petri opened 3 months ago

giacomo-petri commented 3 months ago

Currently, the links within the notes of the Expectations section of Meta viewport allows for zoom rule, direct to the wrong resource: https://www.w3.org/TR/css-viewport-1/, where the algorithm differs significantly from the one used to calculate failing examples.

The new algorithm is as follows: Set-Property matches the listed property names case-insensitively. The property-value strings are interpreted as follows:

  1. If a prefix of property-value can be converted to a number using strtod, the value will be that number. The remainder of the string is ignored.
  2. If the value can not be converted to a number as described above, the whole property-value string will be matched with the following strings case-insensitively: yes, no, device-width, device-height
  3. If the string did not match any of the known strings, the value is unknown.

In contrast, the previous algorithm operated as follows:

  1. Non-negative number values are translated to values, clamped to the range [0.1, 10]
  2. Negative number values are dropped
  3. yes is translated to 1
  4. device-width and device-height are translated to 10
  5. no and unknown values are translated to 0.1

Given that the rule is tailored to old devices (as newer devices typically ignore settings like user-scalable:no and maximum-scale:1), it seems necessary to point to the specific version of the CSS Device Adaptation Module Level 1. Without this specificity, the current wording of the rule lacks coherence.

If you concur with this assessment, I'm happy to create a PR to implement these amendments.

giacomo-petri commented 3 months ago

I'll also seize this opportunity to eliminate Failed Example 6, as it duplicates Failed Example 5.

giacomo-petri commented 2 months ago

Failed Example 6 has already been removed via a previous PR, rendering the previous comment unnecessary.

@Jym77 @carlosapaduarte, regarding my initial point, I'd like to hear your thoughts. While addressing this, I noticed that other links are also outdated, with anchors no longer functional.

I'm contemplating whether it would be prudent to redirect all these links to the "previous" (it's still the current official one) version of CSS Device Adaptation Module Level 1 or if we should amend the rule based on the new CSS Viewport Module Level 1 working draft. However, considering the meta is specific to older devices, perhaps the rule no longer holds relevance if we point to the new documentation.