This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Update react-a11y-anchors-rule to include innerimage alt text as its text content #319
Milestone
Comments
ipip2005
added a commit
that referenced
this issue
Dec 6, 2016
The text content of a link should not be only considered as the literal text in element. Below example: <a href="some_href"> <img alt="somealt" /> </a> The alt attribute will be read by screen reader, it should also be treated as part on the anchor info. As a result The rule should pass when link ONLY has img tag and its alt attribute is equal or longer than 4 chars. The rule should pass when links that point to same HREFs have both same literal text and alt text. The rule should pass when links that point to different HREFs have either different literal text or alt text. The rule should fail when link when both link's literal text and alt text is shorter than 4 chars long. The rule should fail when links that point to different HREFs have same literal text and alt text. The rule should fail when links that point to same HREFs have different literal text or alt text.
ipip2005
added a commit
that referenced
this issue
Dec 7, 2016
The text content of a link should not be only considered as the literal text in element. Below example: <a href="some_href"> <img alt="somealt" /> </a> The alt attribute will be read by screen reader, it should also be treated as part on the anchor info. As a result The rule should pass when link ONLY has img tag and its alt attribute is equal or longer than 4 chars. The rule should pass when links that point to same HREFs have both same literal text and alt text. The rule should pass when links that point to different HREFs have either different literal text or alt text. The rule should fail when link when both link's literal text and alt text is shorter than 4 chars long. The rule should fail when links that point to different HREFs have same literal text and alt text. The rule should fail when links that point to same HREFs have different literal text or alt text.
ipip2005
added a commit
that referenced
this issue
Dec 7, 2016
The text content of a link should not be only considered as the literal text in element. Below example: <a href="some_href"> <img alt="somealt" /> </a> The alt attribute will be read by screen reader, it should also be treated as part on the anchor info. As a result The rule should pass when link ONLY has img tag and its alt attribute is equal or longer than 4 chars. The rule should pass when links that point to same HREFs have both same literal text and alt text. The rule should pass when links that point to different HREFs have either different literal text or alt text. The rule should fail when link when both link's literal text and alt text is shorter than 4 chars long. The rule should fail when links that point to different HREFs have same literal text and alt text. The rule should fail when links that point to same HREFs have different literal text or alt text.
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
The text content of a link should not be only considered as the literal text in element.
Below example:
The alt attribute will be read by screen reader, it should also be treated as part on the anchor info.
As a result
The rule should pass when link ONLY has img tag and its alt attribute is equal or longer than 4 chars.
The rule should pass when links that point to same HREFs have both same literal text and alt text.
The rule should pass when links that point to different HREFs have either different literal text or alt text.
The rule should fail when link when both link's literal text and alt text is shorter than 4 chars long.
The rule should fail when links that point to different HREFs have same literal text and alt text.
The rule should fail when links that point to same HREFs have different literal text or alt text.
The text was updated successfully, but these errors were encountered: