HTML Test Suite For WCAG 2.0 Test 3 - Image Alt Text Is Short. - W3C
Có thể bạn quan tâm
This is a draft document supplied by the WCAG Techniques Task Force. It in no way represents a WCAG Working Group consensus or agreement and is provided for informational and discussion purposes only. The accessibility test listed below should not be construed as required for conformance with the proposed WCAG2.
HTML Test Suite for WCAG 2.0Test 3 - Image Alt text is short.W3C Editor's Draft 2005-08-11
Copyright 2005, ATRC, University Of Toronto, All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
Editors: Chris Ridpath, ATRC, University Of Toronto Jenae Andershonis, Microsoft Inc.Abstract
This test case was created by the ATRC at the University Of Toronto. It should not be construed as required for conformance with the proposed WCAG2.
The complete list of tests may be found at http://www.w3.org/WAI/GL/WCAG20/tests/
Comments on this test may be made to the WCAG mailing list.
Status Of This Test
As part of the conformance test process, this test has a status of 'accepted'.
WCAG2 Guideline
Guideline: 4.1 - Use technologies according to specification. Success Criteria: 1. Except where the author has documented that a specification was violated for user agent compatibility (including compatibility with assistive technology), the content has: passed validity tests for the version of the technology in use (whether it be conforming to a schema, Document Type Definition (DTD), or other tests described in the specification), and used technology features as defined in the specification.
Level 1
The WCAG2 has 3 priority levels for making Web content accessible. This test has a priority of 'Level 1'.
Techniques
The WCAG Working Group has created techniques that describe how Web content may be made accessible. The following techniques are related to this test:
- Short text alternatives for img elements ("alt-text")
Prerequisite Tests
The following tests must be run before running this test. If any of the prerequisite tests fail then this test is invalid and should not be run.
- All img elements have an alt attribute.
Test Process
Procedure
- For each img element, calculate the length of text within the alt attribute value.
- If the Alt text is greater than 100 characters (English) then it must be shortened or the user must confirm that it is the shortest Alt text possible.
Expected Results
- Image Alt text is short or the user has confirmed that the Alt text is as short as possible.
Fail Instructions
- If the alt attribute value is greater than 100 characters (English) then either shorten the alt attribute value or confirm that current value is the shortest possible for the associated image.
Pass Instructions
The following tests are related to this test and may be performed next. There is no requirement that these tests be performed:
- Alt text for all img elements is not placeholder text.
- Alt text for all img elements is the empty string ("") if the image is decorative.
- Alt text for all img elements that are not used as source anchors conveys the same information as the image.
Language Specific
This test contains language specific directions and is dependent upon the language of the content. It may be applied only to content written in the following languages:
| Language | Maximum Alt text Length |
|---|---|
| eng | 100 |
| ger | 115 |
| kor | 90 |
Test Files
These test files contain examples of the accessibility problem detectable by this test. They may also contain more accessibility problems than the one described in this test. Please ignore any extraneous accessibility problems in these files.
- 3-1.html Will fail the test. (Alt text is longer than 100 characters.) <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" /><title>OAC Testfile - Check #3 - Positive</title></head><body><p><img src="rex.jpg" alt="A picture of Rex the cat with some extra text. This is very long alt text. In fact, it was much much too long for this image. Sort alt text would be much better and this alt text should be shortened."/></p></body></html>
- 3-2.html Will pass the test. (Alt text is shorter than 100 characters.) <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" /><title>OAC Testfile - Check #3 - Negative</title></head><body><p><img src="rex.jpg" alt="photo of rex the cat"/></p></body></html>
Từ khóa » Html Img Alt Text Max Length
-
Alt Text No More Than 100 Characters
-
How Long Can An "alt" Attribute Be? | DO-IT - University Of Washington
-
What Is The Limit Of Character To Use In Alt=“text” Of Img Tag In Html
-
There Is No Character Limit For “alt Text”: Myth Debunked! - Eric Eggert
-
Alt Text - Accessibility - Grand Valley State University
-
Alt Text: Why It's Important For Accessibility & SEO - Moz
-
How To Fix The Alt Text Too Long Issue - Sitechecker
-
Image ALT Tag Tips For HTML - Accessibility At Penn State
-
Just How Long Should Alt Text Be? | CSS-Tricks
-
Alt Text SEO - Hobo Web
-
Alt Text Shouldn't Be More Than 100 Characters: UDOIT User Guide
-
Image Alt Text: What It Is, How To Write It, And Why It Matters To SEO
-
How Many Characters Are Used In An ALT Tag (maximum)? - Quora
-
HTML Img Alt Tags For SEO Best Practice - Search Engines Love ...