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

AO3-6480 Update text on adult content warning to improve accessibility #4557

Merged
merged 5 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
14 changes: 8 additions & 6 deletions app/views/works/_adult.html.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<h2 class="landmark heading"><%= t(".page_title") %></h2>

<p class="caution">
<%= ts('This work could have adult content. If you proceed you have agreed that you are willing to see such content.') %>
<%= t(".caution") %>
</p>

<ul class="actions" role="navigation">
<li>
<%= link_to ts('Proceed'), current_path_with(view_adult: true) %>
<%= link_to t(".navigation.continue"), current_path_with(view_adult: true) %>
</li>
<li>
<%= link_to ts('Go Back'), :back %>
<%= link_to t(".navigation.back"), :back %>
</li>
<% if logged_in? %>
<li>
<%= link_to ts('Set your preferences now'), user_preferences_path(current_user) %>
<%= link_to t(".navigation.preferences"), user_preferences_path(current_user) %>
</li>
<% end %>
</ul>

<p class="message footnote">
<%= ts('If you accept cookies from our site and you choose "Proceed", you will not be asked again during this session (that is, until you close your browser). If you log in you can store your preference and never be asked again.') %>
<%= t(".footnote") %>
</p>

<div class="clear"></div>

<ol class="work index group">
<%= render 'works/work_blurb', work: @work %>
<%= render "works/work_blurb", work: @work %>
</ol>
8 changes: 8 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,14 @@ en:
link_tos: Terms of Service
welcome_text: Hi! It looks like you've just logged into the Archive for the first time. %{help_link} or dismiss this message permanently.
works:
adult:
caution: This work could have adult content. If you continue you have agreed that you are willing to see such content.
sarken marked this conversation as resolved.
Show resolved Hide resolved
footnote: If you accept cookies from our site and you choose "Yes, Continue", you will not be asked again during this session (that is, until you close your browser). If you log in you can store your preference and never be asked again.
navigation:
back: No, Go Back
continue: Yes, Continue
preferences: Set your preferences now
page_title: Adult Content Warning
meta:
original_creators:
one: 'Original Creator ID:'
Expand Down
8 changes: 4 additions & 4 deletions features/importing/work_import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Feature: Import Works
And I press "Post"
When I am logged out
And I go to the "Detected Title" work page
And I follow "Proceed"
And I follow "Yes, Continue"
Then I should see "Guest name:"

Scenario: Imported works can have comments disabled to guests
Expand All @@ -172,7 +172,7 @@ Feature: Import Works
And I press "Post"
When I am logged out
And I go to the "Detected Title" work page
And I follow "Proceed"
And I follow "Yes, Continue"
Then I should see "Sorry, this work doesn't allow non-Archive users to comment."

Scenario: Imported works can have comments disabled
Expand All @@ -190,7 +190,7 @@ Feature: Import Works
And I press "Post"
When I am logged out
And I go to the "Detected Title" work page
And I follow "Proceed"
And I follow "Yes, Continue"
Then I should not see "This work's creator has chosen to moderate comments on the work."

Scenario: Imported works can have comment moderation on
Expand All @@ -200,7 +200,7 @@ Feature: Import Works
And I press "Post"
When I am logged out
And I go to the "Detected Title" work page
And I follow "Proceed"
And I follow "Yes, Continue"
Then I should see "This work's creator has chosen to moderate comments on the work."

@work_import_multi_work_backdate
Expand Down
2 changes: 1 addition & 1 deletion features/other_a/reading.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Feature: Reading count
And I am on testuser2 works page
And I follow "fifth"
And I should see "fifth by testuser2"
And I follow "Proceed"
And I follow "Yes, Continue"
And the readings are saved to the database
When I go to fandomer's reading page
Then I should see "History" within "div#dashboard"
Expand Down
4 changes: 2 additions & 2 deletions features/works/work_browse.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ content notice to visitors who are not logged in
And I browse the "Canonical Fandom" works
And I follow the recent chapter link for the work "WIP"
Then I should see "adult content"
When I follow "Proceed"
When I follow "Yes, Continue"
Then I should be on the 3rd chapter of the work "WIP"

Scenario: The recent chapter link in a work's blurb should honor the logged-in
Expand All @@ -82,7 +82,7 @@ user's "Show me adult content without checking" preference
And I browse the "Canonical Fandom" works
And I follow the recent chapter link for the work "WIP"
Then I should see "adult content"
When I follow "Proceed"
When I follow "Yes, Continue"
Then I should be on the 2nd chapter of the work "WIP"

Scenario: The recent chapter link in a work's blurb should point to
Expand Down
4 changes: 4 additions & 0 deletions public/stylesheets/site/2.0/08-actions.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ ul#skiplinks, .landmark, .landmark a, .index .heading.landmark {
opacity: 0;
}

h2.landmark {
display: block;
}

.secondary {
background: #fff;
position: absolute;
Expand Down