Commit 1c5205f6 authored by webchick's avatar webchick

Issue #2509700 by DuaelFr, mgifford: Add role="group" to <figure> to meet WCAG requirements

parent eef45884
......@@ -86,7 +86,7 @@ public function testUsersWithoutPermission() {
$this->drupalGet('node/1');
// Ensure the text is transformed.
$this->assertRaw('<p>Do you also love Drupal?</p><figure class="caption caption-img"><img src="druplicon.png" /><figcaption>Druplicon</figcaption></figure>');
$this->assertRaw('<p>Do you also love Drupal?</p><figure role="group" class="caption caption-img"><img src="druplicon.png" /><figcaption>Druplicon</figcaption></figure>');
// Retrieving the untransformed text should result in an empty 403 response.
$response = $this->drupalPost('editor/' . 'node/1/body/en/full', '', array(), array('query' => array(MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax')));
......@@ -104,7 +104,7 @@ public function testUserWithPermission() {
$this->drupalGet('node/1');
// Ensure the text is transformed.
$this->assertRaw('<p>Do you also love Drupal?</p><figure class="caption caption-img"><img src="druplicon.png" /><figcaption>Druplicon</figcaption></figure>');
$this->assertRaw('<p>Do you also love Drupal?</p><figure role="group" class="caption caption-img"><img src="druplicon.png" /><figcaption>Druplicon</figcaption></figure>');
$response = $this->drupalPost('editor/' . 'node/1/body/en/full', 'application/vnd.drupal-ajax', array());
$this->assertResponse(200);
......
......@@ -12,7 +12,7 @@
* - string classes: The classes of the captioned HTML tag.
*/
#}
<figure{%- if classes %} class="{{ classes }}"{%- endif %}>
<figure role="group"{%- if classes %} class="{{ classes }}"{%- endif %}>
{{ node }}
<figcaption>{{ caption }}</figcaption>
</figure>
......@@ -12,7 +12,7 @@
* - string classes: The classes of the captioned HTML tag.
*/
#}
<figure class="caption caption-{{ tag }}{%- if classes %} {{ classes }}{%- endif %}">
<figure role="group" class="caption caption-{{ tag }}{%- if classes %} {{ classes }}{%- endif %}">
{{ node }}
<figcaption>{{ caption }}</figcaption>
</figure>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment