tree: 568319e96542019542f2068d4419ed39e9f40c77 [search]
  1. 001-headings-and-landmarks.expected.full.json
  2. 001-headings-and-landmarks.expected.full.txt
  3. 001-headings-and-landmarks.expected.json
  4. 001-headings-and-landmarks.expected.txt
  5. 001-headings-and-landmarks.html
  6. 002-text-and-inline.expected.full.json
  7. 002-text-and-inline.expected.full.txt
  8. 002-text-and-inline.expected.json
  9. 002-text-and-inline.expected.txt
  10. 002-text-and-inline.html
  11. 003-links-and-buttons.expected.full.json
  12. 003-links-and-buttons.expected.full.txt
  13. 003-links-and-buttons.expected.json
  14. 003-links-and-buttons.expected.txt
  15. 003-links-and-buttons.html
  16. 004-form-controls.expected.full.json
  17. 004-form-controls.expected.full.txt
  18. 004-form-controls.expected.json
  19. 004-form-controls.expected.txt
  20. 004-form-controls.html
  21. 005-lists.expected.full.json
  22. 005-lists.expected.full.txt
  23. 005-lists.expected.json
  24. 005-lists.expected.txt
  25. 005-lists.html
  26. 006-tables.expected.full.json
  27. 006-tables.expected.full.txt
  28. 006-tables.expected.json
  29. 006-tables.expected.txt
  30. 006-tables.html
  31. 007-images-and-figures.expected.full.json
  32. 007-images-and-figures.expected.full.txt
  33. 007-images-and-figures.expected.json
  34. 007-images-and-figures.expected.txt
  35. 007-images-and-figures.html
  36. 008-hidden-content.expected.full.json
  37. 008-hidden-content.expected.full.txt
  38. 008-hidden-content.expected.json
  39. 008-hidden-content.expected.txt
  40. 008-hidden-content.html
  41. 009-names-and-descriptions.expected.full.json
  42. 009-names-and-descriptions.expected.full.txt
  43. 009-names-and-descriptions.expected.json
  44. 009-names-and-descriptions.expected.txt
  45. 009-names-and-descriptions.html
  46. 010-generic-and-presentation.expected.full.json
  47. 010-generic-and-presentation.expected.full.txt
  48. 010-generic-and-presentation.expected.json
  49. 010-generic-and-presentation.expected.txt
  50. 010-generic-and-presentation.html
  51. 011-details-and-dialog.expected.full.json
  52. 011-details-and-dialog.expected.full.txt
  53. 011-details-and-dialog.expected.json
  54. 011-details-and-dialog.expected.txt
  55. 011-details-and-dialog.html
  56. 012-shadow-dom.expected.full.json
  57. 012-shadow-dom.expected.full.txt
  58. 012-shadow-dom.expected.json
  59. 012-shadow-dom.expected.txt
  60. 012-shadow-dom.html
  61. 013-aria-owns.expected.full.json
  62. 013-aria-owns.expected.full.txt
  63. 013-aria-owns.expected.json
  64. 013-aria-owns.expected.txt
  65. 013-aria-owns.html
  66. 014-iframe.expected.full.json
  67. 014-iframe.expected.full.txt
  68. 014-iframe.expected.json
  69. 014-iframe.expected.txt
  70. 014-iframe.html
  71. 015-widgets.expected.full.json
  72. 015-widgets.expected.full.txt
  73. 015-widgets.expected.json
  74. 015-widgets.expected.txt
  75. 015-widgets.html
  76. 016-whitespace-and-generated-content.expected.full.json
  77. 016-whitespace-and-generated-content.expected.full.txt
  78. 016-whitespace-and-generated-content.expected.json
  79. 016-whitespace-and-generated-content.expected.txt
  80. 016-whitespace-and-generated-content.html
  81. index.json
  82. README.md
common/src/web/accessibility/README.md

Accessibility snapshot corpus

The cross-binding contract for the accessibility snapshot of ADR 18205. Every binding runs every page here in each browser it tests and compares its snapshot to the recorded expectation. The atom's own suite (//javascript/atoms:closure-test, page accessibility_corpus_typescript_test.html) is the first consumer and the thing that records the expectations.

Layout

NNN-name.html                 the page
NNN-name.expected.json        the snapshot of the whole page, as JSON
NNN-name.expected.txt         the same snapshot in the text form of ADR §1
NNN-name.expected.full.json   the unpruned snapshot (interestingOnly false)
NNN-name.expected.full.txt    and its text form
NNN-name.expected[.full].<engine>.json / .txt
                              only where a divergence is recorded below;
                              <engine> is chromium, firefox or webkit
index.json                    the list of page names, in order

Each .html is a plain page with no test harness. The snapshot is taken of the whole document, so the root is the html element as role document named from the title. Every page is recorded twice: pruned, the default (ADR §2), and unpruned, with interestingOnly false, where every rendered element produces a node and generic, none and presentation are kept.

Conventions

  • Every rendered element carries an id, since every one appears in the unpruned form. expected.json stores "element": "<id>"; a binding maps each reference it gets back to its id with one getAttribute("id") call. Text leaves have no element key. The root html element has id="root" and the body id="body".
  • Links use absolute https://example.com/... hrefs, so the url a link node records does not depend on where the corpus is served from.
  • Empty description and states are still written ("" and {}), so the JSON matches javascript/atoms/typescript/accessibility-node.schema.json literally. //javascript/atoms:accessibility-corpus-consistent checks every expectation against that schema and checks that each .txt is the renderer's output over its .json.
  • expected.txt is produced by the reference renderer (javascript/atoms/typescript/testing/accessibility-text.ts), never by hand. The bindings' toText ports are held to these files.
  • Pages must be deterministic across engines: no focus, no user-agent text, no timing. Images use ../map.png from this directory's parent.

Adding or re-recording a page

  1. Add NNN-name.html and its name to index.json.

  2. Run the atom's debug server and open the corpus runner in record mode:

    bazel run //javascript/atoms:closure-test_debug_server
    # http://localhost:2310/filez/_main/javascript/atoms/test/accessibility_corpus_typescript_test.html?record=1
    

    The page shows the JSON and text it computed for every corpus page, in both forms; copy them into the .expected.json, .expected.txt, .expected.full.json and .expected.full.txt files.

  3. Run the corpus page in every browser:

    bazel test //javascript/atoms:closure-test{,-chrome,-edge,-safari} --test_filter=accessibility_corpus_typescript_test
    

Known divergences

Where an engine computes something different from the recorded expectation and the difference is the engine's rather than a bug in the atom, record an engine-specific expectation file and list it here with the reason.

None recorded yet.