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
Show file tree
Hide file tree
Changes from 5 commits
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
26 changes: 17 additions & 9 deletions src/templates/fragments/reminder-notification-fragment.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,28 @@ <h2 ng-if="inputType === 'value'" style="white-space: normal; line-height: norma
</div>
</div>
<div class="primary-outcome-variable-reporting" ng-if="trackingReminderNotification.inputType === 'oneToFiveNumbers'">
<div class="primary-outcome-variable-rating-buttons"><img ng-repeat="option in numericRatingOptions"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
ng-src="{{option.img}}"></div>
<div class="primary-outcome-variable-rating-buttons">
<button ng-repeat="option in numericRatingOptions" ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}">
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>
<br>
</div>
<div class="primary-outcome-variable-reporting" ng-if="trackingReminderNotification.inputType === 'happiestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons"><img ng-repeat="option in positiveRatingOptions"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
ng-src="{{option.img}}"> <br></div>
<div class="primary-outcome-variable-rating-buttons">
<button ng-repeat="option in positiveRatingOptions" ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}">
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>
<br>
</div>
<br>
</div>
<div class="primary-outcome-variable-reporting" ng-if="trackingReminderNotification.inputType === 'saddestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons"><img ng-repeat="option in negativeRatingOptions"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
ng-src="{{option.img}}"> <br></div>
<div class="primary-outcome-variable-rating-buttons">
<button ng-repeat="option in negativeRatingOptions" ng-click="track(trackingReminderNotification, option.numericValue, $event)">
<img ng-src="{{option.img}}">
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>
<br>
</div>
<br>
</div>
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
21 changes: 12 additions & 9 deletions src/templates/reminders-inbox-compact.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,31 @@ <h2 style="white-space: normal; line-height: normal; ">{{trackingReminderNotific
<div class="primary-outcome-variable-reporting"
ng-if="trackingReminderNotifications[0].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"
on-hold="trackAllWithConfirmation(trackingReminderNotifications[0], option.numericValue, $event)"
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)"
ng-src="{{option.img}}">
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)">
<img ng-src="{{option.img}}">
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="primary-outcome-variable-reporting"
ng-if="trackingReminderNotifications[0].inputType === 'happiestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons">
<img id="{{'positiveRatingOptions' + option.numericValue}}" ng-repeat="option in positiveRatingOptions"
<button id="{{'positiveRatingOptions' + option.numericValue}}" ng-repeat="option in positiveRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotifications[0], option.numericValue, $event)"
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)"
ng-src="{{option.img}}">
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)">
<img ng-src="{{option.img}}">
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="primary-outcome-variable-reporting"
ng-if="trackingReminderNotifications[0].inputType === 'saddestFaceIsFive'">
<div class="primary-outcome-variable-rating-buttons">
<img id="{{'negativeRatingOptions' + option.numericValue}}" ng-repeat="option in negativeRatingOptions"
<button id="{{'negativeRatingOptions' + option.numericValue}}" ng-repeat="option in negativeRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotifications[0], option.numericValue, $event)"
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)"
ng-src="{{option.img}}">
ng-click="track(trackingReminderNotifications[0], option.numericValue, $event)">
<img ng-src="{{option.img}}">
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="trackingReminderNotifications[0].unitAbbreviatedName.indexOf('yes/no') !== -1 ">
Expand Down