Skip to content

Commit 1a178d6

Browse files
authored
Merge pull request #52 from cslzchen/feature/a11y-fix-2a-2aa
[ENG-2972][ENG-2973][ENG-3039][ENG-3040][ENG-3042][ENG-3044][ENG-3045][ENG-3047][ENG-3048][ENG-3050][ENG-3052][ENG-3053][ENG-3055][ENG-3056] A11y fixes - 2A and 2AA
2 parents 396a236 + f0baf50 commit 1a178d6

10 files changed

Lines changed: 21 additions & 19 deletions

src/main/resources/templates/casInstitutionLoginView.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ <h2 th:utext="#{screen.institutionlogin.heading}"></h2>
3737
</section>
3838

3939
<section class="text-with-mdi text-bold text-large">
40-
<span th:unless=${osfCasLoginContext.institutionId} th:utext="#{screen.institutionlogin.heading.select}"></span>
41-
<span th:if=${osfCasLoginContext.institutionId} th:utext="#{screen.institutionlogin.heading.auto}"></span>
40+
<label for="institutionSelect" th:unless=${osfCasLoginContext.institutionId} th:utext="#{screen.institutionlogin.heading.select}"></label>
41+
<label for="institutionSelect" th:if=${osfCasLoginContext.institutionId} th:utext="#{screen.institutionlogin.heading.auto}"></label>
4242
</section>
4343

4444
<section class="instn-select">

src/main/resources/templates/casUnsupportedInstitutionLoginView.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ <h3 th:utext="#{screen.unsupp-instn.existing.heading}"></h3>
6565
size="256"
6666
type="email"
6767
name="forgot_password-email"
68-
th:accesskey="#{screen.unsupp-instn.existing.setpw.label.email.accesskey}"
69-
autocomplete="off" />
68+
th:accesskey="#{screen.unsupp-instn.existing.setpw.label.email.accesskey}" />
7069
<label for="username" class="mdc-floating-label" th:utext="#{screen.unsupp-instn.existing.setpw.label.email}"></label>
7170
</div>
7271
</section>

src/main/resources/templates/fragments/header.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-center">
1919
<span class="cas-brand mx-auto" >
20-
<img class="cas-logo" src="/images/osf-logo-white.png">
20+
<img class="cas-logo" src="/images/osf-logo-white.png" alt="OSF logo image in the top navigation bar">
2121
</span>
2222
<div class="cas-brand-text">
2323
<a class="navbar-link" th:href="@{/login(casRedirectSource=tomcat)}">
@@ -29,7 +29,7 @@
2929

3030
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-center">
3131
<div class="form-button form-button-navbar">
32-
<a class="mdc-button mdc-button--raised button-osf-disabled">
32+
<a id="osfRegister" class="mdc-button mdc-button--raised button-osf-disabled">
3333
<span class="mdc-button__label">Sign up</span>
3434
</a>
3535
</div>
@@ -47,8 +47,10 @@
4747
signUpButton.style.cursor = "not-allowed";
4848
signUpButton.style.backgroundColor = "#efefef";
4949
signUpButton.style.color = "#cccccc";
50+
signUpButton.style.visibility = "hidden";
5051
}
5152
}
53+
disableSignUpButton();
5254
</script>
5355

5456
<script type="text/javascript">

src/main/resources/templates/fragments/headerosf.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-center">
1919
<span class="cas-brand mx-auto" >
20-
<img class="cas-logo" src="/images/osf-logo-white.png">
20+
<img class="cas-logo" src="/images/osf-logo-white.png" alt="OSF logo image in the top navigation bar">
2121
</span>
2222
<div class="cas-brand-text">
2323
<a class="navbar-link" th:href="@{${osfUrl.home}}">
@@ -47,6 +47,7 @@
4747
signUpButton.style.cursor = "not-allowed";
4848
signUpButton.style.backgroundColor = "#efefef";
4949
signUpButton.style.color = "#cccccc";
50+
signUpButton.style.visibility = "hidden";
5051
}
5152
}
5253
</script>

src/main/resources/templates/fragments/loginform.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
<section class="form-button-inline" th:if="${osfCasLoginContext.orcidLoginUrl}">
3030
<a class="mdc-button mdc-button--raised button-osf-grey" id="orcidlogin" th:href="@{${osfCasLoginContext.orcidLoginUrl}}">
31-
<img class="delegation-button-logo" src="/images/orcid-logo.png">
31+
<img class="delegation-button-logo" src="/images/orcid-logo.png" alt="ORCiD logo image for the sign-in-with-orcid button">
3232
<span class="delegation-button-label" th:utext="#{screen.welcome.button.orcidlogin}"></span>
3333
</a>
3434
<a class="mdc-button mdc-button--raised button-osf-grey" id="instnLogin" th:href="@{/login(campaign=institution, institutionId=${institutionId ?: ''}, service=${service?.originalUrl ?: ''})}">
35-
<img class="delegation-button-logo" src="/images/institution-logo.png">
35+
<img class="delegation-button-logo" src="/images/institution-logo.png" alt="Institution logo image for the sign-in-via-orcid button">
3636
<span class="delegation-button-label" th:utext="#{screen.welcome.button.institutionlogin}"></span>
3737
</a>
3838
</section>
@@ -101,8 +101,8 @@
101101
size="25"
102102
th:accesskey="#{screen.welcome.label.password.accesskey}"
103103
th:field="*{password}"
104-
autocomplete="off" />
105-
<label for="username" class="mdc-floating-label" th:utext="#{screen.welcome.label.password}"></label>
104+
autocomplete="new-password" />
105+
<label for="password" class="mdc-floating-label" th:utext="#{screen.welcome.label.password}"></label>
106106
</div>
107107
<div class="mdc-text-field-helper-line caps-warn">
108108
<p class="mdc-text-field-helper-text mdc-text-field-helper-text--persistent mdc-text-field-helper-text--validation-msg text-danger">

src/main/resources/templates/fragments/osfbannerui.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<body>
1414
<main role="main" class="container mt-3 mb-3">
1515
<div th:fragment="osfBannerUI" id="osfbannerui" class="mb-4 service-ui text-center">
16-
<img id="servicelogo" class="service-ui-logo" src="/images/osf-banner.png" />
16+
<img id="servicelogo" class="service-ui-logo" src="/images/osf-banner.png" alt="OSF banner image in the main form"/>
1717
</div>
1818
</main>
1919
</body>

src/main/resources/templates/fragments/serviceui.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
<div th:fragment="serviceUI" th:if="${registeredService}" id="serviceui" class="mb-4 service-ui text-center">
1616
<div th:if="${#strings.equalsIgnoreCase(registeredService.class.simpleName, 'OAuthRegisteredService')}">
1717
<div class="osf-banner-without-name">
18-
<img id="serviceLogo" class="service-ui-logo" th:src="@{'images/osf-banner.png'}" />
18+
<img id="serviceLogo" class="service-ui-logo" th:src="@{'images/osf-banner.png'}" alt="OSF banner image in the main form"/>
1919
</div>
2020
</div>
2121
<div th:unless="${#strings.equalsIgnoreCase(registeredService.class.simpleName, 'OAuthRegisteredService')}">
2222
<div class="osf-banner-without-name" th:if="${#strings.isEmpty(registeredService.name)}">
23-
<img id="serviceLogo" class="service-ui-logo" th:src="${registeredService.logo} ? ${registeredService.logo} : @{'images/osf-banner.png'}" />
23+
<img id="serviceLogo" class="service-ui-logo" th:src="${registeredService.logo} ? ${registeredService.logo} : @{'images/osf-banner.png'}" alt="Service banner image in the main form"/>
2424
</div>
2525
<table class="osf-shield-with-name osf-shield-with-name-branded" th:unless="${#strings.isEmpty(registeredService.name)}">
2626
<tbody>
2727
<tr>
2828
<td>
29-
<img id="serviceLogoBranded" class="service-ui-logo service-ui-logo-branded" th:src="${registeredService.logo} ? ${registeredService.logo} : @{'images/osf-logo.png'}" />
29+
<img id="serviceLogoBranded" class="service-ui-logo service-ui-logo-branded" th:src="${registeredService.logo} ? ${registeredService.logo} : @{'images/osf-logo.png'}" alt="Service logo image in the main form"/>
3030
</td>
3131
<td>
3232
<span id="serviceNameBranded" class="service-ui-name service-ui-name-branded" th:text="${registeredService.name}"></span>

src/main/resources/templates/fragments/totploginform.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
maxlength="6"
8181
th:accesskey="#{screen.twofactor.label.onetimepassword.accesskey}"
8282
th:field="*{oneTimePassword}"
83-
autocomplete="off"
83+
autocomplete="new-password"
8484
autofocus />
85-
<label for="username" class="mdc-floating-label" th:utext="#{screen.twofactor.label.onetimepassword}"></label>
85+
<label for="oneTimePassword" class="mdc-floating-label" th:utext="#{screen.twofactor.label.onetimepassword}"></label>
8686
</div>
8787
</div>
8888
<button class="reveal-password mdc-button mdc-button--raised mdc-input-group-append" type="button">

src/main/resources/templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
2+
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" lang="en-us">
33

44
<head>
55
<meta charset="UTF-8" />

src/main/resources/templates/layoutosf.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
2+
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" lang="en-us">
33

44
<head>
55
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)