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

improve accessibility of notifications settings #7995

Merged
Merged
Changes from all 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
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