Skip to content

Commit

Permalink
improve accessibility of notifications settings (#7995)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlazypanda committed Jun 11, 2020
1 parent c056cb0 commit e8a018b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/views/users/settings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<span>Do you want to be notified by email for comments on your posts? </span>
<span>
<label class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notify-comment-direct:false" <% unless UserTag.exists?(current_user.id, 'notify-comment-direct:false') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -20,6 +21,7 @@
<span>Do you want to be notified by email for likes on your posts? </span>
<span>
<label class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notify-likes-direct:false" <% unless UserTag.exists?(current_user.id, 'notify-likes-direct:false') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -33,6 +35,7 @@
<span>Do you want to be notified by email for comments on all posts you've commented on? </span>
<span>
<label class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notify-comment-indirect:false" <% unless UserTag.exists?(current_user.id, 'notify-comment-indirect:false') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -47,6 +50,7 @@
<span>Do you want to be notified by email for moderation emails? </span>
<span>
<label class="switch">
<p> Notification switch </p>
<input type="checkbox" name="no-moderation-emails" <% unless UserTag.exists?(current_user.id, 'no-moderation-emails') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -62,6 +66,7 @@
<span>Do you want to receive customized digest weekly?</span>
<span>
<label style=" vertical-align: middle;" class="switch">
<p> Notification switch </p>
<input type="checkbox" name="digest:weekly" <% if UserTag.exists?(current_user.id, 'digest:weekly') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -75,6 +80,7 @@
<span>Do you want to receive customized digest daily?</span>
<span>
<label style=" vertical-align: middle;" class="switch">
<p> Notification switch </p>
<input type="checkbox" name="digest:daily" <% if UserTag.exists?(current_user.id, 'digest:daily') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -88,6 +94,7 @@
<span>Do you want to receive browser notification when you are mentioned?</span>
<span>
<label style=" vertical-align: middle;" class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notifications:mentioned" <% if UserTag.exists?(current_user.id, 'notifications:mentioned') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -101,6 +108,7 @@
<span>Do you want to receive browser notification for all ?</span>
<span>
<label style=" vertical-align: middle;" class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notifications:all" <% if UserTag.exists?(current_user.id, 'notifications:all') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand All @@ -114,6 +122,7 @@
<span>Do you want to receive browser notification when someone likes your work?</span>
<span>
<label style=" vertical-align: middle;" class="switch">
<p> Notification switch </p>
<input type="checkbox" name="notifications:like" <% if UserTag.exists?(current_user.id, 'notifications:like') %>checked<% end %>>
<span class="slider round"></span>
</label>
Expand Down Expand Up @@ -191,7 +200,7 @@

}

.switch input {display:none;}
.switch input,p {display:none;}

.slider {
position: absolute;
Expand Down

0 comments on commit e8a018b

Please sign in to comment.