Skip to content

Commit

Permalink
W3c html validation fixes (#462)
Browse files Browse the repository at this point in the history
* Remove unnecessary slash on input elements

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Remove unnecessary alt attribute on a elements

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Change span to div

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Remove unnecessary navigation role to nav element

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Change section to div

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Add missing src attribute to img element, data:, represents and empty
text file

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Remove unnecessary slash on input elements

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Add missing alt attribute to img element

Signed-off-by: Kenneth Kostrešević <[email protected]>

* Turn parent div into figure in order to fix figcaption error

Signed-off-by: Kenneth Kostrešević <[email protected]>

---------

Signed-off-by: Kenneth Kostrešević <[email protected]>
Co-authored-by: Kenneth Kostresevic <[email protected]>
  • Loading branch information
ken-kost and Kenneth Kostresevic committed May 16, 2023
1 parent 0c81605 commit 3bc372d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/changelog_web/templates/layout/_header.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<% end %>

<form action="<%= Routes.search_path(@conn, :search) %>" method="get" class="header-search">
<input name="q" type="text" placeholder="Search Changelog" value="" aria-label="Search"/>
<input name="q" type="text" placeholder="Search Changelog" value="" aria-label="Search">
</form>

<button class="header-menu js-toggle-nav" title="Toggle Menu">
Expand Down Expand Up @@ -102,7 +102,7 @@

<div class="mobile_nav-bottom">
<form action="<%= Routes.search_path(@conn, :search) %>" method="get" class="mobile_nav-search search-form">
<input name="q" type="text" placeholder="Search Changelog" aria-label="Search"/>
<input name="q" type="text" placeholder="Search Changelog" aria-label="Search">
</form>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions lib/changelog_web/templates/layout/_player.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<button class="podcast_player-nav-button podcast_player-nav-button--close js-player-close" title="Close Player"></button>
</nav>
<div class="image_border_hack">
<img class="podcast_player-art js-player-art">
<img class="podcast_player-art js-player-art" src="data:," alt="Player art">
</div>
<div class="podcast_player-details">
<div class="podcast_player-details-title">
<figure class="podcast_player-details-title">
<span class="js-player-now-playing"></span>
<figcaption class="js-player-title"></figcaption>
</div>
</figure>
</div>
<div class="podcast_player-buttons">
<button class="podcast_player-button podcast_player-button--prev_episode js-player-prev-button" title="Listen to the previous episode">
Expand All @@ -32,11 +32,11 @@
<div class="range_slider">
<span class="range_slider-above"><span class="js-player-now-playing"></span></span>
<div class="range_slider-range_wrap">
<input class="range_slider-range js-player-scrubber" type="range" value="0" min="0" max="500"/>
<input class="range_slider-range js-player-scrubber" type="range" value="0" min="0" max="500">
<div class="range_slider-range-track js-player-track"></div>
</div>
<span class="range_slider-below"> <span class="js-player-title"></span>&nbsp;<select class="js-chapter-select is-hidden"></select>
<output><button class="js-player-speed" title="Change Speed">[1X]</button> <b class="js-player-current">0:00</b><input class="js-player-current-input is-hidden"/> / <span class="js-player-duration">0:00</span></output></span>
<output><button class="js-player-speed" title="Change Speed">[1X]</button> <b class="js-player-current">0:00</b><input class="js-player-current-input is-hidden"> / <span class="js-player-duration">0:00</span></output></span>
</div>
</form>
</figure>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="news_item-toolbar-meta-item news_item-toolbar-meta-item__featuring">
<div class="news_item-toolbar-meta-item news_item-toolbar-meta-item__featuring">
<% {main_participants, additional_participants} = @episode |> Episode.participants() |> Enum.split(5) %>
<%= for person <- main_participants do %>
<%= link(to: PersonView.profile_path(person), title: person.name) do %>
Expand All @@ -18,4 +18,4 @@
</div>
</div>
<% end %>
</span>
</div>
10 changes: 5 additions & 5 deletions lib/changelog_web/templates/page/index.html.eex
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<%= render(ChangelogWeb.PodcastView, "index.html", assigns) %>

<section class="show">
<div class="show">
<a id="recent" class="anchor"></a>
<div class="feed">
<nav class="subnav">
<ul class="subnav-list">
<li class="subnav-list-item">
<%= link("Recent Episodes", to: "#recent", title: "Recent episodes from all Changelog podcasts", alt: "Recent Episodes") %>
<%= link("Recent Episodes", to: "#recent", title: "Recent episodes from all Changelog podcasts") %>
</li>

<li class="subnav-list-item subnav-list-item--right">
<%= link("🙏 Request!", to: Routes.episode_request_path(@conn, :new), title: "Request an episode", alt: "Request an Episode") %>
<%= link("🙏 Request!", to: Routes.episode_request_path(@conn, :new), title: "Request an episode") %>
</li>
</ul>
</nav>
Expand All @@ -19,9 +19,9 @@
<%= if Enum.any?(@items) do %>
<%= render_many(@items, NewsItemView, "_summary.html", Map.merge(assigns, %{as: :item, style: "date"})) %>

<nav class="load_more" role="navigation" aria-label="Pagination">
<nav class="load_more" aria-label="Pagination">
<%= link("View All", to: Routes.podcast_path(@conn, :show, "master"), class: "load_more-button") %>
</nav>
<% end %>
</div>
</section>
</div>

0 comments on commit 3bc372d

Please sign in to comment.