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 new note page #8054

Merged
merged 1 commit into from
Jun 23, 2020
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
18 changes: 10 additions & 8 deletions app/views/editor/rich.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

<div class="ple-module-content col-lg-9">
<input
aria-label="Enter Note Title"
class="form-control input-lg"
type="text"
id="title-input"
Expand Down Expand Up @@ -100,6 +101,7 @@
</div>
<p>
<input
aria-label="Upload image"
type="file"
accept=".png, .jpg, .jpeg"
name="image[photo]"
Expand Down Expand Up @@ -145,7 +147,7 @@

<div class="col-lg-6">
<div class="form-group">
<label>By place name</label>
<label for="placenameInput">By place name</label>
<p>
<input id="placenameInput" type="text" class="form-control" />
</p>
Expand All @@ -156,7 +158,7 @@

<div id="coord_input" class="row">
<div class="col-sm-6">
<label>Latitude</label>
<label for="lat">Latitude</label>
<p>
<input
id="lat"
Expand All @@ -168,7 +170,7 @@
</div>

<div class="col-sm-6">
<label>Longitude</label>
<label for="lng">Longitude</label>
<p>
<input
id="lng"
Expand Down Expand Up @@ -221,7 +223,7 @@
</div>

<div class="ple-module-content col-lg-9">
<textarea id="text-input" class="ple-textarea form-control"><% if @node && @node.latest && @node.latest.body_rich %><%= @node.latest.body %><% else %><%= params[:body] %><% end %></textarea>
<textarea aria-label="Enter note description" id="text-input" class="ple-textarea form-control"><% if @node && @node.latest && @node.latest.body_rich %><%= @node.latest.body %><% else %><%= params[:body] %><% end %></textarea>
</div>

</div>
Expand All @@ -237,6 +239,7 @@

<div class="ple-module-content col-lg-9">
<input
aria-label="Enter related tags"
class="form-control input-lg"
type="text"
placeholder="balloon-mapping, water-quality..."
Expand Down Expand Up @@ -424,7 +427,7 @@
new L.LatLng(-90, 180)
);
editor.mapModule.blurredLocation.map.setMaxBounds(bounds);

<% if @lat and @lon %>
<% if @zoom %>
editor.mapModule.blurredLocation.setZoom(<%= @zoom %>);
Expand All @@ -440,7 +443,7 @@
$('#coord_input').toggle();
});
$("#coord_input").hide();

$(function() {
var target = document.querySelector('#map_content');
var observer = new MutationObserver(function(mutations) {
Expand All @@ -459,7 +462,7 @@
}
}
setLocationButtonText();

$("#obscureLocation").prop('checked', <%= @map_blurred %>);
editor.mapModule.blurredLocation.setBlurred(<%= @map_blurred %>);

Expand Down Expand Up @@ -508,4 +511,3 @@
}

</script>