-
Notifications
You must be signed in to change notification settings - Fork 75
New rule: Image contains no text (0va7u6) #1522
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
Conversation
_rules/image-no-text-0va7u6.md
Outdated
|
||
## Assumptions | ||
|
||
The text is the most significant content in the image. If there is text in the image, but it is not the most significant content, this rule might fail but the success criterion might still be satisfied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is an assumption rather than part of the Expectation. Do you feel it's ambiguous? (it certainly is subjective).
I guess this is to exclude, say, image of a street with street signs or shop signs showing text. I'm a bit afraid this is going to exclude a ton of images from the rule (i.e. that it is a very strong assumption that often won't hold).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I do feel "most significant content" is ambiguous. That's why I moved this to an assumption.
It would be nice to have input on this from other reviewers...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The WCAG definition for "image of text" already excludes "text that is part of a picture that contains significant other visual content", so I'm not sure we need to have this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we don't link to the WCAG definition of "image of text" so we need to have this here (or worked into the expectation).
And I don't think we could use it, because, at least for me, the part about "significant other visual content" is ambiguous. If you consider the example given in the definition, an image of "a person's name on a name tag in a photograph", assuming that the person is also on the photograph, I wouldn't consider it to be an image of text because there would be other significant visual content on the image.. So, I guess, this is ambiguous...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite see what is ambiguous about "significant other visual content". Can you explain what different ways there are to interpret this phrase? Sure we can disagree over when something is "significant" in the same way we can disagree about if something is "descriptive". There's a quantitative aspect to it; How significant is enough? How descriptive is enough? But I think the meaning of this is clear. It's subjective, but I don't see this is ambiguous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern would not be the "how much significant" but the "is this part of the image significant". As I said in my previous reply, the example of "image of text" in the WCAG definition is not something that I would consider an image of text (it's true that the example needs context that is not provided, so I had to assume the context), so I have to conclude that the "significant other visual content" is being ambiguously interpreted.
Nevertheless, I seem to be the only one having this doubt, so I can give it a try and include this in the expectation.
updates plus discussion needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple new questions…
_rules/image-no-text-0va7u6.md
Outdated
|
||
## Applicability | ||
|
||
This rule applies to any HTML element that is [visible][] for which one of the following is true: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a mention somewhere that the image is not decorative? ("convey information")
Either by checking roles rather than element (can be in applicability), or adding a condition in expectation about "the image is [pure decoration][]".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one of the the first thoughts that crossed my mind when I started thinking about this rule. I discussed this with @WilcoFiers and he easily convinced me that this is not relevant for this SC. If you are presenting text then you should use text and not images of text unless the presentation is essential. You can always mark text as decorative if it is not being used to convey information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I have to disagree with the conclusion…
1.4.9, the corresponding AAA criterion, is explicitly allowing images of text that are pure decoration. It would be weird if they were failing 1.4.5…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That line in 1.4.9 really made me change my mind. I've updated the applicability.
Co-authored-by: Jean-Yves Moyen
Co-authored-by: Jean-Yves Moyen
_rules/image-no-text-0va7u6.md
Outdated
|
||
## Applicability | ||
|
||
This rule applies to any HTML element that is [visible][] for which one of the following is true: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I have to disagree with the conclusion…
1.4.9, the corresponding AAA criterion, is explicitly allowing images of text that are pure decoration. It would be weird if they were failing 1.4.5…
_rules/image-no-text-0va7u6.md
Outdated
@@ -26,11 +26,12 @@ acknowledgments: | |||
This rule applies to any HTML element that is [visible][] for which one of the following is true: | |||
|
|||
- the element is an `img` element where at least one of the [image sources][] in its [source set][] does not reference an SVG document; or | |||
- the element is an `input` element in the [Image Button][] state and its `src` [attribute value][] does not reference an SVG document. | |||
- the element is an `input` element with a `type` [attribute value][] of `image` and its `src` [attribute value][] does not reference an SVG document; or | |||
- the element has a [`background-image`][background-image] CSS property with at least one [`image`][css-image] that is a [url reference][url-reference] that does not reference an SVG document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which value of the property do you consider? I guess the computed value (after resolving cascade and such).
…t-rules/act-rules.github.io into image-contains-no-text-0va7u6
@nitedog ready for your review again (changes made to the examples) |
_rules/image-no-text-0va7u6.md
Outdated
- the image resource contains text and it is [essential][] that the text is rendered with that specific presentation; or | ||
- the image resource does not contain text expressing anything in a [human language][]; or | ||
- the image resource contains text and the text is not a significant part of the visual content in the image; or | ||
- the [visible pixels][visible] of the rendered image resource contain text and it is [essential][] that the text is rendered with that specific presentation; or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it could be simplified:
- the [visible pixels][visible] of the rendered image resource contain text and it is [essential][] that the text is rendered with that specific presentation; or | |
- the [visible pixels][visible] of the rendered image resource contain text for which its presentation is [essential]; or |
_rules/image-no-text-0va7u6.md
Outdated
@@ -36,24 +36,23 @@ This rule applies to any [visible][] [embedded image][]. | |||
|
|||
For the rendered image resource of the [image sources][] of each test target, at least one of the following is true: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should hoist the visible pixels thing into the setup to avoid repeating that phrase 3 times:
For the rendered image resource of the [image sources][] of each test target, at least one of the following is true: | |
For the [visible pixels][] of the rendered image resource of the [image sources][] of each test target, at least one of the following is true: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that there is a 4th condition...
changes made
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the wordcloud asset is not used anymore and can be deleted.
_rules/image-no-text-0va7u6.md
Outdated
For each test target, at least one of the following is true: | ||
|
||
- the [visible pixels][visible] of the rendered image resource contain text and it is [essential][] that the text is rendered with that specific presentation; or | ||
- the [visible pixels][visible] of the rendered image resource do not contain text expressing anything in a [human language][]; or | ||
- the [visible pixels][visible] of the rendered image resource contain text and the text is not a significant part of the visual content in the image; or | ||
- the test target is [purely decorative][]. | ||
- the [visible pixels][visible] of the test target contain text for which its presentation is [essential][]; or | ||
- the [visible pixels][visible] of the test target do not contain text expressing anything in a [human language][]; or | ||
- the [visible pixels][visible] of the test target contain text and the text is not a significant part of the [visible pixels][visible] of the test target; or | ||
- the [embedded image][] the test target belongs to is [purely decorative][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if we want to factor in the "visible pixels" bit, we could do something like
For each test target, either is belongs to a purely decorative image or at least on of the following is true for its visible pixels:
But I'm not sure this is much better because it extracts a condition from the list, and because we usually want each individual condition to actually frontload the common thingie they apply to, so they would still real "the visible pixels contains no text", …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep it as a list with all the conditions for the reasons you enumerate. If others prefer this solution, I won't oppose to the change.
Co-authored-by: Jean-Yves Moyen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some comments on the definition for Embedded Image but I understand that these are mostly editorial.
Final call until February 10 |
Final call ended. Merging |
New rule for 1.4.5 checking that images do not contain text unless it is essential
Need for Final Call:
This will require a 2 weeks Final Call (new rule)
Pull Request Etiquette
When creating PR:
develop
branch (left side).After creating PR:
Rule
,Definition
orChore
.When merging a PR:
How to Review And Approve