Proposed tests for the HTML Image Description Extension specification. These tests are © chaals, and available under the W3C Software license
These 15 tests include descriptions under different combinations of circumstances - images included "normally", as data: URIs, or missing, with the descriptions internal or external to the page, as a data: URI, or in a location only reachable by taking into account the base element.
The same tests are used to provide 3 results: 1 Can the user discover there is an image that has a long description available? 2 Can the user access the description? To pass, the user should arrive at the "pass page" which has a heading "Pass" followed by a description, or the focus must be on the text "Pass, if the focus is here" which is followed by a description of the image. 3 Is the long description available to system accessibility APIs
- data:URI image with data:URI description
- Empty image with data:URI description
- External image with data:URI description (with extra spaces)
- External image with data:URI description
- data:URI with External description
- Empty image with an External description
- External image with External description (with extra spaces)
- External image with External description
- data:URI with Internal description.html
- Empty image with an Internal description.html
- External image with an Internal description (with extra spaces)
- External image with an Internal description
- data:URI with External description fragment
- Empty image with an External description fragment
- External image with External description fragment (with extra spaces around the URL)
- External image with External description fragment
- External image with External Description (relative base element set)
- External image with External Description (absolute base element set)
Longdesc value updated by javascript tests that the HTML attribute reflects changes made by javascript. To pass, the browser must redirect to the "Longdesc test Pass Page" which has the word "Pass" as a heading, followed by a description of the image. Displaying the "Longdesc test Fail Page" would indicate a failure of this test.
Invalid long description (plain text) contains an invalid long description (plain text) and can be used to test User Agent and validation tool handling. NOTE: Handling of invalid longdescs by user agents is currently undefined. Invalid long description (empty attribute) contains an invalid long description (plain text) and can be used to test User Agent and validation tool handling. NOTE: Handling of invalid longdescs by user agents is currently undefined. Pointer to an invalid long description (not contained in a well-formed fragment) points to a long description in a page fragment whose target is an empty element. Validation tools should at least generate a warning, since an empty element is almost certainly not an adequate description, and is likely instead to reflect not passing the relevant authoring requirement.
Preliminary test results are available for some platforms. More results are welcome.
The following files are required to make one or more of the tests work:
- README.md - this documentation
- README-offline.html - an HTML version of this content to allow the contents of the repository to be posted somewhere as a self-contained bundle.
- fail.html
- pass.html
- fail-fragment.html
- pass-fragment.html
- picture.png
- rebased/picture2.png)
- rebased/fail.html (actually a pass page, used to test what happens in the presence of a
<base>
element)