Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat faces as buttons instead of images on mobile #3607

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions src/templates/items/notification-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,38 @@ <h2 style="white-space: normal; line-height: normal; ">{{trackingReminderNotific
<div id="numericRatingOptions" class="primary-outcome-variable-reporting"
ng-if="trackingReminderNotification.inputType === 'oneToFiveNumbers'">
<div class="primary-outcome-variable-rating-buttons">
<img id="{{'numericRatingOptions' + option.numericValue}}" ng-repeat="option in numericRatingOptions"
<button id="{{'numericRatingOptions' + option.numericValue}}" ng-repeat="option in numericRatingOptions"
style="width: 18%; background: none; border: none;"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)" ng-src="{{option.img}}">
ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}"
style="width: 100%;">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

</button>
</div>
</div>
<div id="happiestFaceIsFive" class="primary-outcome-variable-reporting"
ng-if="trackingReminderNotification.inputType === 'happiestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons">
<img id="{{'positiveRatingOptions' + option.numericValue}}" ng-repeat="option in positiveRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)" ng-src="{{option.img}}">
<button id="{{'positiveRatingOptions' + option.numericValue}}" ng-repeat="option in positiveRatingOptions"
style="width: 18%; background: none; border: none;"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}"
style="width: 100%;">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

</button>
</div>
</div>
<div id="saddestFaceIsFive" class="primary-outcome-variable-reporting"
ng-if="trackingReminderNotification.inputType === 'saddestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons">
<img id="{{'negativeRatingOptions' + option.numericValue}}" ng-repeat="option in negativeRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)" ng-src="{{option.img}}">
<button id="{{'negativeRatingOptions' + option.numericValue}}"
style="width: 18%; background: none; border: none;"
ng-repeat="option in negativeRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}"
style="width: 100%;">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

</button>
</div>
</div>
<div class="row" ng-if="trackingReminderNotification.unitAbbreviatedName.indexOf('yes/no') !== -1 ">
Expand Down