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.
29 lines
800 B
Plaintext
29 lines
800 B
Plaintext
<div class="document direct-upload document-fields nested-fields">
|
|
<%= f.hidden_field :id %>
|
|
<%= f.hidden_field :user_id, value: current_user.id %>
|
|
<%= f.hidden_field :cached_attachment %>
|
|
|
|
<div class="small-12 column title">
|
|
<%= f.text_field :title, placeholder: t("documents.form.title_placeholder") %>
|
|
</div>
|
|
|
|
<div class="small-12 column attachment-actions">
|
|
<div class="small-9 column action-add attachment-errors document-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>
|