Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@editor @editor_tiny @tiny_accessibilitychecker
2
Feature: Tiny editor accessibility checker
3
  To write accessible content in Tiny, I need to check for accessibility warnings.
4
 
5
  @javascript
6
  Scenario Outline: Perform basic accessibility validations
7
    Given I log in as "admin"
8
    And I open my profile in edit mode
9
    And I set the field "Description" to "<content>"
10
    When I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
11
    Then I should see "<result>" in the "Accessibility checker" "dialogue"
12
 
13
    Examples:
14
      | result                                                                         | content                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
15
      | The colours of the foreground and background text do not have enough contrast. | <p style='color: #7c7cff; background-color: #ffffff;'>Hard to read</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
16
      | There is a lot of text with no headings.                                       | <p>Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.</p><p>Jelly beans gingerbread tootsie roll. Sugar plum tiramisu cotton candy toffee pie cotton candy tiramisu. Carrot cake chocolate bar sesame snaps cupcake cake dessert sweet fruitcake wafer. Marshmallow cupcake gingerbread pie sweet candy canes powder gummi bears. Jujubes cake muffin marshmallow candy jelly beans tootsie roll pie. Gummi bears applicake chocolate cake sweet jelly sesame snaps lollipop lollipop carrot cake. Marshmallow cake jelly beans. Jelly beans sesame snaps muffin halvah cookie ice cream candy canes carrot cake. Halvah donut marshmallow tiramisu. Cookie dessert gummi bears. Sugar plum apple pie jelly beans gummi bears tart chupa chups. Liquorice macaroon gummi bears gummies macaroon marshmallow sweet roll cake topping. Lemon drops caramels pie icing danish. Chocolate cake oat cake dessert halvah danish carrot cake apple pie.</p> |
17
      | Tables should not contain merged cells, as screen readers may not support them.| <table><caption>Dogs that look good in pants</caption><tr><th>Breed</th><th>Coolness</th></tr><tr><td>Poodle</td><td rowspan='2'>NOT COOL</td></tr><tr><td>Doberman</td></tr></table>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
18
      | Tables should use row and/or column headers.                                   | <table><caption>Dogs that look good in pants</caption><tr><th>Breed</th><td>Coolness</td></tr><tr><td>Poodle</td><td>NOT COOL</td></tr><tr><td>Doberman</td><td>COOL</td></tr></table>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
19
      | A table caption is not required, but is generally helpful.                     | <table><tr><th>Breed</th><th>Coolness</th></tr><tr><td>Poodle</td><td>NOT COOL</td></tr><tr><td>Doberman</td><td>COOL</td></tr></table>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
20
 
21
  @javascript
22
  Scenario: Perform accessibility validation on images with no alt attribute
23
    Given I log in as "admin"
24
    And I open my profile in edit mode
25
    And I set the field "Description" to "<p>Some plain text</p><img src='http://download.moodle.org/unittest/test.jpg' width='1' height='1'/><p>Some more text</p>"
26
    And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
27
    And I should see "Images require alternative text." in the "Accessibility checker" "dialogue"
28
    And I click on "View" "link" in the "Accessibility checker" "dialogue"
29
    And I click on the "Image" button for the "Description" TinyMCE editor
30
    And I wait "1" seconds
31
    And I click on "This image is decorative only" "checkbox"
32
    And I set the field "How would you describe this image to someone who can't see it:" to "No more warning!"
33
    And I press "Save"
34
    And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
35
    And I should see "Congratulations, no accessibility issues found!" in the "Accessibility checker" "dialogue"
36
    And I click on "Close" "button" in the "Accessibility checker" "dialogue"
37
    And I select the "img" element in position "2" of the "Description" TinyMCE editor
38
    And I click on the "Image" button for the "Description" TinyMCE editor
39
    And I set the field "URL" to "http://download.moodle.org/unittest/test.jpg"
40
    And I click on "Add" "button" in the "Insert image" "dialogue"
41
    And I wait "1" seconds
42
    And I set the field "How would you describe this image to someone who can't see it:" to ""
43
    And I click on "This image is decorative only" "checkbox"
44
    When I press "Save"
45
    And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
46
    Then I should see "Congratulations, no accessibility issues found!" in the "Accessibility checker" "dialogue"
47
 
48
  @javascript
49
  Scenario: Placeholder element will not be assessed by accessibility checker
50
    Given I log in as "admin"
51
    And I open my profile in edit mode
52
    When I set the field "Description" to "<p>Some plain text</p><img src='/broken-image' width='1' height='1' class='behat-tinymce-placeholder'/><p>Some more text</p>"
53
    And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
54
    Then I should see "Congratulations, no accessibility issues found!" in the "Accessibility checker" "dialogue"