This way screen reader users will hear the name of the file before hearing about the link to destroy it. We were already displaying it this way visually by having the file name on the left and the destroy link on the right. Thanks to this change we can also simplify the code which dynamically changed the layout.
30 lines
851 B
Plaintext
30 lines
851 B
Plaintext
<div class="image direct-upload nested-fields">
|
|
<%= f.hidden_field :id %>
|
|
<%= f.hidden_field :user_id, value: current_user.id %>
|
|
<%= f.hidden_field :cached_attachment %>
|
|
|
|
<div class="small-12 margin-top title">
|
|
<%= f.text_field :title, placeholder: t("images.form.title_placeholder") %>
|
|
</div>
|
|
|
|
<%= render_image(image, :thumb, false) if image.attachment.exists? %>
|
|
|
|
<div class="small-12 column attachment-actions">
|
|
<div class="small-9 column action-add attachment-errors image-attachment">
|
|
<%= file_field %>
|
|
</div>
|
|
|
|
<p class="file-name small-9 column"><%= file_name %></p>
|
|
|
|
<div class="small-3 column action-remove text-right">
|
|
<%= destroy_link %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<div class="progress-bar-placeholder"><div class="loading-bar"></div></div>
|
|
</div>
|
|
|
|
<hr>
|
|
</div>
|