Add a lang attribute to language options
I'm not sure screen readers recognize this attribute inside `<option>` tags, but if they do, it'll probably be helpful. And if they don't, no harm will be done.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</label>
|
||||
<select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher">
|
||||
<% locales.map do |loc| %>
|
||||
<option <%= "selected" if loc == I18n.locale %>
|
||||
<option lang="<%= loc %>" <%= "selected" if loc == I18n.locale %>
|
||||
value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user