Skip to content

Commit

Permalink
MDL-70829 block_myoverview: Mark up decorative image properly
Browse files Browse the repository at this point in the history
* The zero state image is purely decorative so there's no need to
set a non-empty alt text for it.
* The presentation role is also unnecessary for decorative image with
empty alt.
* Accessibility Behat tests added to cover changes
  • Loading branch information
junpataleta committed Apr 12, 2024
1 parent 31b4e4c commit cfcf794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions blocks/myoverview/templates/zero-state.mustache
Expand Up @@ -51,8 +51,7 @@
<div class="text-xs-center text-center mt-3" data-region="empty-message">
<img class="empty-placeholder-image-lg mt-1"
src="{{nocoursesimg}}"
alt="{{{ title }}}"
role="presentation"
alt=""
>
<h5 class="h5 mt-3 mb-0">{{{ title }}}</h5>
<p class="mt-3 mb-0">{{{ intro }}}</p>
Expand Down
Expand Up @@ -70,3 +70,8 @@ Feature: Zero state on my overview block
And "Create course" "button" should exist
And I click on "Create course" "button"
And I should see "Add a new course"

@accessibility
Scenario: Evaluate the accessibility of the My courses (zero state)
When I am on the "My courses" page logged in as "manager"
Then the page should meet accessibility standards

0 comments on commit cfcf794

Please sign in to comment.