Commit 61782ff9 by Ahsan Ulhaq

Merge pull request #7898 from…

Merge pull request #7898 from edx/ahsan/AC-99-learner-profile-location-language-fields-accessibility

Learner profile Location and Language fields Accessibility issues
parents 473c6886 0a696ae8
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
new FieldsView.DropdownFieldView({ new FieldsView.DropdownFieldView({
model: accountSettingsModel, model: accountSettingsModel,
screenReaderTitle: gettext('Country'), screenReaderTitle: gettext('Country'),
titleVisible: false,
required: true, required: true,
editable: editable, editable: editable,
showMessages: false, showMessages: false,
...@@ -90,6 +91,7 @@ ...@@ -90,6 +91,7 @@
new AccountSettingsFieldViews.LanguageProficienciesFieldView({ new AccountSettingsFieldViews.LanguageProficienciesFieldView({
model: accountSettingsModel, model: accountSettingsModel,
screenReaderTitle: gettext('Preferred Language'), screenReaderTitle: gettext('Preferred Language'),
titleVisible: false,
required: false, required: false,
editable: editable, editable: editable,
showMessages: false, showMessages: false,
......
...@@ -325,6 +325,7 @@ ...@@ -325,6 +325,7 @@
mode: this.mode, mode: this.mode,
title: this.options.title, title: this.options.title,
screenReaderTitle: this.options.screenReaderTitle || this.options.title, screenReaderTitle: this.options.screenReaderTitle || this.options.title,
titleVisible: this.options.titleVisible || true,
iconName: this.options.iconName, iconName: this.options.iconName,
showBlankOption: (!this.options.required || !this.modelValueIsSet()), showBlankOption: (!this.options.required || !this.modelValueIsSet()),
selectOptions: this.options.options, selectOptions: this.options.options,
......
...@@ -127,7 +127,16 @@ ...@@ -127,7 +127,16 @@
display: none; display: none;
} }
&.mode-edit a.u-field-value-display { button.u-field-value-display, button.u-field-value-display:active, button.u-field-value-display:focus, button.u-field-value-display:hover{
border-color: transparent;
background: transparent;
padding: 0;
box-shadow: none;
font-size: inherit;
}
&.mode-edit button.u-field-value-display {
display: none; display: none;
} }
} }
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
</label> </label>
<% } %> <% } %>
<% if (!titleVisible) { %>
<label class="sr" for="u-field-select-<%- id %>">
<%- screenReaderTitle %>
</label>
<% } %>
<% if (iconName) { %> <% if (iconName) { %>
<i class="u-field-icon icon fa <%- iconName %> fa-fw" aria-hidden="true"></i> <i class="u-field-icon icon fa <%- iconName %> fa-fw" aria-hidden="true"></i>
<% } %> <% } %>
...@@ -17,11 +23,11 @@ ...@@ -17,11 +23,11 @@
<option value="<%- selectOption[0] %>"><%- selectOption[1] %></option> <option value="<%- selectOption[0] %>"><%- selectOption[1] %></option>
<% }); %> <% }); %>
</select> </select>
<a href="#" class="u-field-value-display"> <button class="u-field-value-display">
<span class="sr"><%- screenReaderTitle %></span> <span class="sr"><%- screenReaderTitle %> &nbsp;</span>
<span class="u-field-value-readonly"></span> <span class="u-field-value-readonly"></span>
<span class="sr"><%- gettext('Click to edit') %></span> <span class="sr">&nbsp; <%- gettext('Click to edit') %></span>
</a> </button>
</span> </span>
<span class="u-field-message" id="u-field-message-<%- id %>"> <span class="u-field-message" id="u-field-message-<%- id %>">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment